# GRUB (GRand Unified Boot-loader) options

# Usage:
# Make a symlink from "/usr/share/grub-net/" to "/tftpboot/grub/", and
# place a GRUB menu file at "/tftpboot/grub-hosts/menu.lst" (see
# /usr/share/doc/grub-net/examples/menu.lst for an example).
# Note that symlinks won't work if using chroot with tftp (which is much
# recommended!) - copy pxegrub-all and nbgrub-all instead.

# # Normal options first (including default filename, if any)
# subnet 192.168.101.0 netmask 255.255.255.0 {
# 	option broadcast-address 192.168.101.0;
# 	option subnet-mask 255.255.255.0;
#	range 192.168.101.101 192.168.101.199;
# }
#
# include "/etc/local-common/dhcp3/dhcpd.grub";
#
# # Accepted hosts (syntax is "1:" + MAC address)
# subclass "grub-hosts" 1:00:50:ba:8b:c2:7b;
# subclass "grub-hosts" 1:00:01:02:0a:0b:0c { fixed-address 192.168.1.101; another-option "bla bla"; }

option grub-configfile	code 150 = text;

class "grub-hosts" {
        match pick-first-value (option dhcp-client-identifier, hardware);

	if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
		filename	"grub/pxegrub-all";
	} else if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {
		filename	"grub/nbgrub-all";
		option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
	} else {
		option grub-configfile "(nd)/grub-hosts/menu.lst";
	}
}