2020-11-13 03:43:10 +01:00
|
|
|
# Alpine Linux Grub config
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
set this_isopath="${isodev}${isopath}/alpine"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
# abuse for to check for existence
|
|
|
|
for isofile in ${this_isopath}/alpine-standard*.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 Alpines in ${this_isopath}"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
submenu "Alpine Linux >" "${this_isopath}" --class alpine {
|
|
|
|
this_isopath=$2
|
|
|
|
|
|
|
|
for isofile in ${this_isopath}/alpine-standard*.iso; do
|
2020-11-13 03:43:10 +01:00
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isoname \
|
|
|
|
--set 2:variant \
|
|
|
|
--set 3:version \
|
|
|
|
--set 4:arch \
|
2023-04-07 19:45:36 +02:00
|
|
|
"^.*/(alpine-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
|
2020-11-13 03:43:10 +01:00
|
|
|
|
|
|
|
menuentry "Alpine Linux ${variant} ${version} ${arch}" "${isofile}" "${isoname}" --class alpine {
|
|
|
|
set isofile=$2
|
2023-04-07 19:45:36 +02:00
|
|
|
set isoname=$3
|
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
--set 2:isofile \
|
|
|
|
"^(\(.*\))?(.*)\$" "${isofile}"
|
|
|
|
|
|
|
|
echo "Using ${isoname}..."
|
|
|
|
loopback loop "${isodev}${isofile}"
|
|
|
|
linux (loop)/boot/grsec initrd=/boot/grsec.gz iso-scan/filename=${isofile} alpine_dev=usbdisk:exfat modules=loop,cramfs,sd-mod,usb-storage
|
|
|
|
initrd (loop)/boot/grsec.gz
|
2020-11-13 03:43:10 +01:00
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# kill for loop
|
|
|
|
break
|
|
|
|
done
|