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)
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
set this_isopath="${isodev}${isopath}/bodhi"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
|
|
|
# abuse for to check for existence
|
2023-04-07 19:45:36 +02:00
|
|
|
for isofile in ${this_isopath}/bodhi-*.iso; do
|
2020-11-13 03:43:10 +01:00
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
echo "Found Bodhis in ${this_isopath}"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
2023-04-07 19:45:36 +02: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 \
|
2023-04-07 19:45:36 +02:00
|
|
|
"^.*/(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
|
2023-04-07 19:45:36 +02:00
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
--set 2:isofile \
|
|
|
|
"^(\(.*\))?(.*)\$" "${isofile}"
|
|
|
|
|
2020-11-13 03:43:10 +01:00
|
|
|
echo "Using ${isoname}..."
|
2023-04-07 19:45:36 +02:00
|
|
|
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
|