summaryrefslogtreecommitdiff
path: root/dhcp3/dhcpd.grub
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2004-10-06 21:02:12 +0000
committerJonas Smedegaard <dr@jones.dk>2004-10-06 21:02:12 +0000
commitdd572eae7639d05066e3d3f8fcde8988f5dbc7b1 (patch)
tree90f986bcb5f1cf21556478fe591942bce80ec666 /dhcp3/dhcpd.grub
parentfa78451ebd444f11e98f81df5265e3c7415ef7fa (diff)
Add somewhat generic dhcpd addon snippets.
Diffstat (limited to 'dhcp3/dhcpd.grub')
-rw-r--r--dhcp3/dhcpd.grub36
1 files changed, 36 insertions, 0 deletions
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";
+ }
+}