Skip to content
Snippets Groups Projects
Commit ff5a7425 authored by livio's avatar livio Committed by Libreboot project
Browse files

Improved GRUB directory listing by automatically filling from any possible (super/sub)directories

parent 0747fe06
Branches
No related tags found
No related merge requests found
......@@ -136,12 +136,24 @@ menuentry "List all bootable medias" {
scan_l_media_menus
}
# FIXME Make an automatic override for BTRFS directories instead of copypasting with a "@/" in front of every element
# 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"
set grub_dirs="" # Complete list of every possible grub directory, automatically filled later
set grub_dir_super="@" # Possible list of superdirectories (BTRFS can have those)
set grub_dir="boot grub grub2" # First level directories list
set grub_dir_sub="grub grub2" # Second level directories list
for i in '' ${grub_dir_super}; do
grub_dirs="${grub_dirs} ${i}"
for j in ${grub_dir}; do
grub_dirs="${grub_dirs} ${i}/${j}"
for k in ${grub_dir_sub}; do
grub_dirs="${grub_dirs} ${i}/${j}/${k}"
done
done
done
# Default list of GRUB possible config files prefixes
set grub_conf_names="'' osboot_ autoboot_ libreboot_ coreboot_"
set grub_conf_names="osboot_ autoboot_ libreboot_ coreboot_"
# Creates a menuentry for GRUB. First argument is menu text without spaces then root and configfile
function grub_menuentry {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment