I have the case where I need to give detailed PXE booting parameters for
some LAN hosts identified primarily by their MAC address. The web GUI
doesn't allow this, so I hacked up the php code as below.

Is this the best way to go about it?
Can it be generalised sufficiently to include something like this in the
web interface?

Thanks,

Volker

--- /etc/inc/services.inc.orig  2007-04-09 12:01:57.000000000 +1200
+++ /etc/inc/services.inc       2007-08-07 17:13:12.000000000 +1200
@@ -285,6 +285,45 @@
                                if ($sm['ipaddr'])
                                        $dhcpdconf .= " fixed-address 
{$sm['ipaddr']};\n";
 
+
+// Set up special extended entries for hosts which boot from the network.
+// This needs to be manually maintained, and re-patched when pfSense is 
updated.
+// Check that these additional settings are written to the file
+// /var/dhcpd/etc/dhcpd.conf
+// Note that basic entries for these IP addresses must already exist in the 
+// DHCP server config.
+if ($sm['ipaddr'] == "192.168.1.1" or $sm['ipaddr'] == "host1") {
+       $dhcpdconf .= <<<EOD
+       option host-name "host1";
+       next-server bootserver;
+       filename "/pxelinux.0";
+       option root-path 
"/srv/nfsroot,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800";
+
+EOD;
+}
+if ($sm['ipaddr'] == "192.168.1.2" or $sm['ipaddr'] == "host2") {
+       $dhcpdconf .= <<<EOD
+       option host-name "host2";
+       next-server bootserver;
+       filename "/pxelinux.0";
+       option root-path 
"/srv/nfsroot,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800";
+
+EOD;
+}
+
+
+
                                $dhcpdconf .= "}\n";
                                $i++;
                        }

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to