Test for squashfs recovery (#359)

This commit is contained in:
Itxaka 2023-08-03 19:49:57 +02:00 committed by GitHub
parent b08a265748
commit a35c0feffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
name: "grub-config"
category: "static"
version: "0.4"
version: "0.5"

View File

@ -81,13 +81,13 @@ menuentry "${display_name} (fallback)" --id fallback {
}
menuentry "${display_name} recovery" --id recovery {
if search --no-floppy --file /cOS/recovery.squashfs ; then
search --no-floppy --label --set=root COS_RECOVERY
if [ test -s /cOS/recovery.squashfs ]; then
set img=/cOS/recovery.squashfs
set recoverylabel=COS_RECOVERY
else
set img=/cOS/recovery.img
fi
search --no-floppy --label --set=root COS_RECOVERY
set label=COS_SYSTEM
loopback loop0 /$img
set root=($root)