From dd572eae7639d05066e3d3f8fcde8988f5dbc7b1 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 6 Oct 2004 21:02:12 +0000 Subject: Add somewhat generic dhcpd addon snippets. --- dhcp3/dhcpd.grub | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dhcp3/dhcpd.grub (limited to 'dhcp3/dhcpd.grub') diff --git a/dhcp3/dhcpd.grub b/dhcp3/dhcpd.grub new file mode 100644 index 0000000..a8ac453 --- /dev/null +++ b/dhcp3/dhcpd.grub @@ -0,0 +1,36 @@ +# 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"; + } +} -- cgit v1.2.3