本文整理汇总了PHP中system_resolvconf_generate函数的典型用法代码示例。如果您正苦于以下问题:PHP system_resolvconf_generate函数的具体用法?PHP system_resolvconf_generate怎么用?PHP system_resolvconf_generate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了system_resolvconf_generate函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mwexec
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);
}
unset($ignore_posted_dnsgw);
示例2: explode
$pconfig['outgoing_interface'] = explode(",", $a_unboundcfg['outgoing_interface']);
}
if (empty($a_unboundcfg['system_domain_local_zone_type'])) {
$pconfig['system_domain_local_zone_type'] = "transparent";
} else {
$pconfig['system_domain_local_zone_type'] = $a_unboundcfg['system_domain_local_zone_type'];
}
if ($_POST) {
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
clear_subsystem_dirty('unbound');
}
/* Update resolv.conf in case the interface bindings exclude localhost. */
system_resolvconf_generate();
/* Start or restart dhcpleases when it's necessary */
system_dhcpleases_configure();
} else {
$pconfig = $_POST;
unset($input_errors);
if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable'])) {
if ($pconfig['port'] == $config['dnsmasq']['port']) {
$input_errors[] = gettext("The DNS Forwarder is enabled using this port. Choose a non-conflicting port, or disable the DNS Forwarder.");
}
}
if (empty($pconfig['active_interface'])) {
$input_errors[] = gettext("One or more Network Interfaces must be selected for binding.");
} else {
if (!isset($config['system']['dnslocalhost']) && (!in_array("lo0", $pconfig['active_interface']) && !in_array("all", $pconfig['active_interface']))) {
$input_errors[] = gettext("This system is configured to use the DNS Resolver as its DNS server, so Localhost or All must be selected in Network Interfaces.");
示例3: unset
unset($config['system']['dhcpbackup']);
}
}
// Add/Remove RAM disk periodic backup cron jobs according to settings and installation type.
// Remove the cron jobs on full install if not using RAM disk.
// Add the cron jobs on all others if the periodic backup option is set. Otherwise the cron job is removed.
if ($g['platform'] == $g['product_name'] && !isset($config['system']['use_mfs_tmpvar'])) {
install_cron_job("/etc/rc.backup_rrd.sh", false);
install_cron_job("/etc/rc.backup_dhcpleases.sh", false);
} else {
install_cron_job("/etc/rc.backup_rrd.sh", $config['system']['rrdbackup'] > 0, $minute = "0", "*/{$config['system']['rrdbackup']}");
install_cron_job("/etc/rc.backup_dhcpleases.sh", $config['system']['dhcpbackup'] > 0, $minute = "0", "*/{$config['system']['dhcpbackup']}");
}
write_config();
$retval = 0;
system_resolvconf_generate(true);
$retval = filter_configure();
if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message(gettext($retval));
} else {
$savemsg = gettext($retval);
}
activate_powerd();
load_crypto();
load_thermal_hardware();
if ($need_relayd_restart) {
relayd_configure();
}
}
}
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Miscellaneous"));