Fixed incorrect path to the grub-btrfs.cfg file in Grub menu (#79)

Fix #72
The submenu generated by "grub-btrfs" doesn't load in the "GRUB menu."
Sometimes the Grub prefix and root variable don't match.
This ensures that the prefix variable is used to load the grub-btrfs.cfg file.
See
How to specify files
and
Special environment variables : root
and
Special environment variables : prefix
This commit is contained in:
Antynea
2019-12-09 22:40:33 +01:00
committed by GitHub
parent 6cd13037ce
commit 27335ffbaf

View File

@@ -549,8 +549,7 @@ root_grub="$(make_system_path_relative_to_its_root /boot/$grub_directory)"
# Make a submenu in GRUB (grub.cfg)
cat << EOF
submenu '${submenuname}' {
search -f --set=root --no-floppy /grub/grub-btrfs.cfg
configfile "${root_grub}/grub-btrfs.cfg"
configfile "\${prefix}/grub-btrfs.cfg"
}
EOF
printf "###### - Grub-btrfs: Snapshot detection ended - ######\n" >&2 ;