configs/*/grub/grub.cfg: reuse ARCHISO_HINT and ARCHISO_UUID passed from the embedded grub.cfg
The `grub.cfg` embedded in the GRUB binaries already sets `ARCHISO_HINT` and `ARCHISO_UUID` in most cases. To avoid performing the same searches multiple times, use the existing variables.
This commit is contained in:
parent
b94d7c4ce5
commit
f7502001b0
@ -25,9 +25,13 @@ if serial --unit=0 --speed=115200; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Search for the ISO volume
|
# Search for the ISO volume
|
||||||
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
|
if [ -z "${ARCHISO_UUID}" ]; then
|
||||||
search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}"
|
if [ -z "${ARCHISO_HINT}" ]; then
|
||||||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
|
||||||
|
fi
|
||||||
|
search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}"
|
||||||
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default=archlinux
|
default=archlinux
|
||||||
|
@ -25,9 +25,13 @@ if serial --unit=0 --speed=115200; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Search for the ISO volume
|
# Search for the ISO volume
|
||||||
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
|
if [ -z "${ARCHISO_UUID}" ]; then
|
||||||
search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}"
|
if [ -z "${ARCHISO_HINT}" ]; then
|
||||||
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
|
||||||
|
fi
|
||||||
|
search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}"
|
||||||
|
probe --set ARCHISO_UUID --fs-uuid "${root}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default menu entry
|
# Set default menu entry
|
||||||
default=archlinux
|
default=archlinux
|
||||||
|
Loading…
Reference in New Issue
Block a user