<div id="netboot-server"> <h3>NetBoot Server</h3> <div class="container"> <ul> <li> <span>DHCP Status:</span> <br> <br> <br> <span><?php if (getNetBootStatus()) { echo "Running"; } else { echo "Not Running"; } ?> </span> </li> <li> <span>Total NetBoot Image Size:</span> <br> <br> <span><?php echo suExec(netbootusage); ?>
if (strpos($line, "</body>") !== FALSE) { $desc .= "{$line}\n"; $desc = str_replace("<body>", "", str_replace("</body>", "", $desc)); echo "<br/>Description: {$desc}<br/>\n"; } else { if ($captureDesc) { $desc .= "{$line}\n"; } } } } } } } if (isset($_POST['NetBootImage']) && ($_GET['service'] = "NetBoot")) { $wasrunning = getNetBootStatus(); $nbi = $_POST['NetBootImage']; if ($nbi != "") { $nbconf = file_get_contents("/var/appliance/conf/dhcpd.conf"); $nbsubnets = ""; foreach ($conf->getSubnets() as $key => $value) { $nbsubnets .= "subnet " . $value['subnet'] . " netmask " . $value['netmask'] . " {\n\tallow unknown-clients;\n}\n\n"; } $nbconf = str_replace("##SUBNETS##", $nbsubnets, $nbconf); suExec("touchconf \"/var/appliance/conf/dhcpd.conf.new\""); if (file_put_contents("/var/appliance/conf/dhcpd.conf.new", $nbconf) === FALSE) { echo "<div class=\"errorMessage\">ERROR: Unable to update dhcpd.conf</div>"; } suExec("disablenetboot"); suExec("installdhcpdconf"); if ($wasrunning || isset($_POST['enablenetboot'])) {