diff --git a/config/grub/config/grub.cfg b/config/grub/config/grub.cfg index 018e38475b63b1eb1a8f435126ee56e7fb5bee3a..745cde8b14db09f6dd20318db0ce12ca4110d3a3 100644 --- a/config/grub/config/grub.cfg +++ b/config/grub/config/grub.cfg @@ -80,13 +80,17 @@ set pager=1 read } +# Default list of GRUB possible directories. The @/... entries are for cases where the BTRFS filesystem is being used +set grub_dirs="boot grub grub2 boot/grub boot/grub2 @/boot @/grub @/grub2 @/boot/grub @/boot/grub2" +# Default list of GRUB possible config files prefixes +set grub_conf_names="'' osboot_ autoboot_ libreboot_ coreboot_" + function try_user_grub_config { set root="${1}" - # 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 ${grub_dirs}; do # In order to save time, we do not attempt anything on non existing directory. if [ -d /"${dir}"/ ]; then - for name in '' osboot_ autoboot_ libreboot_ coreboot_; do + for name in ${grub_conf_names}; do if [ -f /"${dir}"/"${name}"grub.cfg ]; then unset superusers configfile /"${dir}"/"${name}"grub.cfg