From 4e9cd82858fa2ae487bc7ff3088ef195dbff262b Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Thu, 8 Mar 2007 19:48:47 +0000 Subject: Allow for basic network boot configuration In Use By: Seth --- usr/local/www/services_dhcp.php | 77 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 4 deletions(-) (limited to 'usr/local/www/services_dhcp.php') diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 6625d35..583cf2e 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -70,6 +70,11 @@ list($pconfig['dns1'],$pconfig['dns2']) = $config['dhcpd'][$if]['dnsserver']; $pconfig['enable'] = isset($config['dhcpd'][$if]['enable']); $pconfig['denyunknown'] = isset($config['dhcpd'][$if]['denyunknown']); $pconfig['staticarp'] = isset($config['dhcpd'][$if]['staticarp']); +$pconfig['ddnsdomain'] = $config['dhcpd'][$if]['ddnsdomain']; +$pconfig['ddnsupdate'] = isset($config['dhcpd'][$if]['ddnsupdate']); +$pconfig['netboot'] = isset($config['dhcpd'][$if]['netboot']); +$pconfig['nextserver'] = $config['dhcpd'][$if]['next-server']; +$pconfig['filename'] = $config['dhcpd'][$if]['filename']; $pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip']; $pconfig['netmask'] = $config['dhcpd'][$if]['netmask']; @@ -129,6 +134,13 @@ if ($_POST) { if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime']))) { $input_errors[] = "The maximum lease time must be at least 60 seconds and higher than the default lease time."; } + if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain']))) { + $input_errors[] = "A valid domain name must be specified for the dynamic DNS registration."; + } + if (($_POST['nextserver'] && !is_ipaddr($_POST['nextserver']))) { + $input_errors[] = "A valid IP address must be specified for the network boot server."; + } + if (!$input_errors) { /* make sure the range lies within the current subnet */ @@ -177,6 +189,11 @@ if ($_POST) { $config['dhcpd'][$if]['denyunknown'] = ($_POST['denyunknown']) ? true : false; $config['dhcpd'][$if]['enable'] = ($_POST['enable']) ? true : false; $config['dhcpd'][$if]['staticarp'] = ($_POST['staticarp']) ? true : false; + $config['dhcpd'][$if]['ddnsdomain'] = $_POST['ddnsdomain']; + $config['dhcpd'][$if]['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false; + $config['dhcpd'][$if]['netboot'] = ($_POST['netboot']) ? true : false; + $config['dhcpd'][$if]['next-server'] = $_POST['nextserver']; + $config['dhcpd'][$if]['filename'] = $_POST['filename']; write_config(); @@ -230,8 +247,8 @@ include("head.inc"); ?> - @@ -390,7 +424,7 @@ function enable_change(enable_over) { Failover peer IP: -
+
Leave blank to disable. Enter the REAL address of the other machine. Machines must be using CARP. @@ -418,6 +452,41 @@ function enable_change(enable_over) { + Dynamic DNS + +
+ - Show Dynamic DNS +
+ + + + + Enable Network booting + +
+ - Show Network booting +
+ + + +   -- cgit v1.1