grub.cfg: split up try_user_config
in the next revision, i will add ESP paths Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
2ea5e61cfd
commit
b3d58f1edc
|
@ -61,15 +61,19 @@ if [ -f (cbfsdisk)/keymap.gkb ]; then
|
||||||
keymap (cbfsdisk)/keymap.gkb
|
keymap (cbfsdisk)/keymap.gkb
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function try_user_config {
|
function really_try_user_config {
|
||||||
set root="${1}"
|
set root="${1}"
|
||||||
|
|
||||||
|
if [ -f /"${2}"/grub.cfg ]; then
|
||||||
|
unset superusers
|
||||||
|
configfile /"${2}"/grub.cfg
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function try_user_config {
|
||||||
# The @/... entries are for cases where the BTRFS filesystem is being used
|
# The @/... entries are for cases where the BTRFS filesystem is being used
|
||||||
for dir in boot grub grub2 boot/grub boot/grub2 @/boot @/grub @/grub2 @/boot/grub @/boot/grub2; do
|
for dir in boot grub grub2 boot/grub boot/grub2 @/boot @/grub @/grub2 @/boot/grub @/boot/grub2; do
|
||||||
if [ -f /"${dir}"/grub.cfg ]; then
|
really_try_user_config "${1}" "${dir}"
|
||||||
unset superusers
|
|
||||||
configfile /"${dir}"/grub.cfg
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
function search_grub {
|
function search_grub {
|
||||||
|
|
Loading…
Reference in New Issue