本文整理匯總了PHP中system_hosts_generate函數的典型用法代碼示例。如果您正苦於以下問題:PHP system_hosts_generate函數的具體用法?PHP system_hosts_generate怎麽用?PHP system_hosts_generate使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了system_hosts_generate函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
} elseif ($act == "newpool") {
$a_pools[] = $dhcpdconf;
} else {
$config['dhcpd'][$if] = $dhcpdconf;
}
write_config();
}
}
if (isset($_POST['submit']) || isset($_POST['apply'])) {
$retval = 0;
$retvaldhcp = 0;
$retvaldns = 0;
/* Stop DHCP so we can cleanup leases */
killbyname("dhcpd");
dhcp_clean_leases();
system_hosts_generate();
/* dnsmasq_configure calls dhcpd_configure */
/* no need to restart dhcpd twice */
if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) {
$retvaldns = services_dnsmasq_configure();
if ($retvaldns == 0) {
clear_subsystem_dirty('hosts');
clear_subsystem_dirty('staticmaps');
}
} else {
if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) {
$retvaldns = services_unbound_configure();
if ($retvaldns == 0) {
clear_subsystem_dirty('unbound');
}
} else {
示例2: mwexec
// Remove the route. Later calls will add the correct new route if needed.
if (is_ipaddrv4($olddnsservers[$dnscounter - 1])) {
mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter - 1]));
} else {
if (is_ipaddrv6($olddnsservers[$dnscounter - 1])) {
mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter - 1]));
}
}
}
}
if ($changecount > 0) {
write_config($changedesc);
}
$retval = 0;
$retval = system_hostname_configure();
$retval |= system_hosts_generate();
$retval |= system_resolvconf_generate();
if (isset($config['dnsmasq']['enable'])) {
$retval |= services_dnsmasq_configure();
} elseif (isset($config['unbound']['enable'])) {
$retval |= services_unbound_configure();
}
$retval |= system_timezone_configure();
$retval |= system_ntp_configure();
if ($olddnsallowoverride != $config['system']['dnsallowoverride']) {
$retval |= send_event("service reload dns");
}
// Reload the filter - plugins might need to be run.
$retval |= filter_configure();
$savemsg = get_std_save_message($retval);
}