From ee1b024ea938c0df466d48136958a7f3aee3ed84 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 2 Aug 2007 11:43:04 +0000 Subject: - correct behaviour of dhcpd.conf creation - enable root-path --- etc/inc/services.inc | 8 ++++++-- usr/local/www/services_dhcp.php | 33 +++++++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 321e13f..a065167 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -276,10 +276,10 @@ EOD; if (is_array($dhcpifconf['ntpserver']) && $dhcpifconf['ntpserver'][0]) $dhcpdconf .= " option ntp-servers " . join(",", $dhcpifconf['ntpserver']) . ";\n"; - if (isset($dhcpifconf['tftp'])) + if ($dhcpifconf['tftp'] <> "") $dhcpdconf .= " option tftp-server-name \"{$dhcpifconf['tftp']}\";\n"; - if (isset($dhcpifconf['ldap'])) + if ($dhcpifconf['ldap'] <> "") $dhcpdconf .= " option ldap-server \"{$dhcpifconf['ldap']}\";\n"; if(isset($dhcpifconf['netboot'])) { @@ -287,7 +287,11 @@ EOD; $dhcpdconf .= " next-server {$dhcpifconf['next-server']};\n"; $dhcpdconf .= " filename \"{$dhcpifconf['filename']}\";\n"; } + if (($dhcpifconf['rootpathip'] <> "") && ($dhcpifconf['rootpath'] <> "")) { + $dhcpdconf .= " option root-path \"{$dhcpifconf['rootpathip']}:{$dhcpifconf['rootpath']}\";\n"; + } } + $dhcpdconf .= <<Enables network booting.

-
- Enter the IP address from the network boot server. -

+ Enter the IP of the next-server + + and the filename
- Enter the filename used for network booting.
Note: You need both a filename and a boot server configured for this to work! - +

+ Enter the IP of the NFS-server + + and the rootpath +
+ Note: You need both a NFS-server and a path configured for this to work! + - +   -- cgit v1.1