grubby/boot/isos.cfg.d/bodhi.cfg

44 lines
1.1 KiB
INI
Raw Normal View History

2020-11-13 03:43:10 +01:00
# Bodhi Linux Grub Config
# NOTE: As of 5.0.0 the "legacy" image can't mount FAT32 (charset error)
set this_isopath="${isodev}${isopath}/bodhi"
2020-11-13 03:43:10 +01:00
# abuse for to check for existence
for isofile in ${this_isopath}/bodhi-*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
echo "Found Bodhis in ${this_isopath}"
2020-11-13 03:43:10 +01:00
submenu "Bodhi Linux >" "${this_isopath}" --class bodhi {
this_isopath=$2
for isofile in ${this_isopath}/bodhi-*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:variant \
"^.*/(bodhi-([^-]+)-(.+)\.iso)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
menuentry "Bodhi ${version} ${variant}" "${isofile}" "${isoname}" --class bodhi {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
2020-11-13 03:43:10 +01:00
linux (loop)/casper/vmlinuz iso-scan/filename=${isofile} file=/cdrom/preseed/custom.seed boot=casper quiet splash
initrd (loop)/casper/initrd*
}
done
}
# kill for loop
break
done