aboutsummaryrefslogtreecommitdiff
path: root/modules/grub2/files/grub-scan.cfg
blob: f6761b7bcbccc7f1553298a8d10f39055cb5a9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
for x in (ahci*,*) (usb*.*) ; do
	if [ -f "${x}/netbsd" ] ; then
		menuentry "Load NetBSD from $x" $x { 
			root=$2
			knetbsd /netbsd
		}
	fi
	for path in '' /grub /grub2 /boot /boot/grub /boot/grub2; do
		if [ -f "${x}${path}/grub.cfg" ] ; then
			menuentry "Load config from ${x}" $x $path { 
				root=$2
				configfile "/${3}/grub.cfg"
			}
		fi
	done
	for path in '' /boot; do
		if [ -f "${x}${path}/syslinux/syslinux.cfg" ] ; then
			menuentry "Load syslinux config from ${x}" $x $path { 
				root=$2
				syslinux_configfile -s "${3}/syslinux/syslinux.cfg"
			}
		fi
		if [ -f "${x}${path}/isolinux/isolinux.cfg" ] ; then
			menuentry "Load isolinux config from ${x}" $x $path { 
				root=$2
				syslinux_configfile -i "${3}/isolinux/isolinux.cfg"
			}
		fi
	done
done