diff -urb new/etc/inc/services.inc custom/etc/inc/services.inc --- new/etc/inc/services.inc 2010-07-12 13:25:12.450445328 +0300 +++ custom/etc/inc/services.inc 2010-07-12 16:17:42.112987836 +0300 @@ -315,11 +315,13 @@ } } + /* Custom dhcp data goes here */ + $dhcpdconf .= $dhcpifconf['custom_cdata']; + $dhcpdconf .= <<\n"; } else { $xmlconfig .= "<$ent>" . htmlentities($cval) . "\n"; @@ -285,7 +285,7 @@ $xmlconfig .= "<$ent/>\n"; } else if (!is_bool($val)) { $xmlconfig .= str_repeat("\t", $indent); - if (substr($ent, 0, 5) == "descr") + if (substr($ent, 0, 5) == "descr" or substr($ent, -6) == "_cdata") $xmlconfig .= "<$ent>\n"; else $xmlconfig .= "<$ent>" . htmlentities($val) . "\n"; diff -urb new/usr/local/www/services_dhcp.php custom/usr/local/www/services_dhcp.php --- new/usr/local/www/services_dhcp.php 2010-07-12 13:56:38.907508685 +0300 +++ custom/usr/local/www/services_dhcp.php 2010-07-12 16:21:51.004988888 +0300 @@ -155,6 +155,7 @@ $pconfig['rootpath'] = $config['dhcpd'][$if]['rootpath']; $pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip']; $pconfig['netmask'] = $config['dhcpd'][$if]['netmask']; + $pconfig['custom_cdata'] = $config['dhcpd'][$if]['custom_cdata']; $pconfig['numberoptions'] = $config['dhcpd'][$if]['numberoptions']; if (!is_array($config['dhcpd'][$if]['staticmap'])) $config['dhcpd'][$if]['staticmap'] = array(); @@ -321,6 +322,7 @@ $config['dhcpd'][$if]['next-server'] = $_POST['nextserver']; $config['dhcpd'][$if]['filename'] = $_POST['filename']; $config['dhcpd'][$if]['rootpath'] = $_POST['rootpath']; + $config['dhcpd'][$if]['custom_cdata'] = $_POST['custom_cdata']; // Handle the custom options rowhelper if(isset($config['dhcpd'][$if]['numberoptions']['item'])) @@ -457,6 +459,12 @@ aodiv = document.getElementById('shownetboot'); aodiv.style.display = "block"; } + + function show_custom_config() { + document.getElementById("showcustombox").innerHTML=''; + aodiv = document.getElementById('showcustom'); + aodiv.style.display = "block"; + } @@ -793,6 +801,18 @@ + Custom DHCP configuration + +
+ - Show custom DHCP configuration +
+ + + +