mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
system: use system_resolver_configure() everywhere
Do not delete system_resolvconf_generate/system_hosts_generate yet. We may just end up renaming them in order to get external callers to adapt to the new layout.
This commit is contained in:
parent
4c84f442c8
commit
412c0c7b71
@ -127,8 +127,8 @@ function filter_configure_xmlrpc()
|
||||
require_once("interfaces.inc");
|
||||
|
||||
system_routing_configure();
|
||||
system_resolver_configure();
|
||||
filter_configure();
|
||||
system_hosts_generate();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -59,8 +59,7 @@ if (!isset($config['interfaces'][$interface]['enable'])) {
|
||||
}
|
||||
|
||||
/* this may be required to cleanse the DNS information no longer available */
|
||||
system_resolvconf_generate();
|
||||
system_hosts_generate();
|
||||
system_resolver_configure();
|
||||
|
||||
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);
|
||||
$ip = get_interface_ip($interface);
|
||||
|
||||
@ -59,8 +59,7 @@ if (!isset($config['interfaces'][$interface]['enable'])) {
|
||||
}
|
||||
|
||||
/* this may be required to cleanse the DNS information no longer available */
|
||||
system_resolvconf_generate();
|
||||
system_hosts_generate();
|
||||
system_resolver_configure();
|
||||
|
||||
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);
|
||||
$ip = get_interface_ipv6($interface);
|
||||
|
||||
@ -48,7 +48,7 @@ function validate_partial_mac_list($maclist)
|
||||
|
||||
function reconfigure_dhcpd()
|
||||
{
|
||||
system_hosts_generate();
|
||||
system_resolver_configure();
|
||||
plugins_configure('hosts');
|
||||
clear_subsystem_dirty('hosts');
|
||||
dhcpd_dhcp4_configure();
|
||||
|
||||
@ -36,7 +36,7 @@ require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
function reconfigure_dhcpd()
|
||||
{
|
||||
system_hosts_generate();
|
||||
system_resolver_configure();
|
||||
plugins_configure('hosts');
|
||||
clear_subsystem_dirty('hosts');
|
||||
dhcpd_dhcp6_configure();
|
||||
|
||||
@ -127,17 +127,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
} elseif (isset($a_dnsmasq['local_ttl'])) {
|
||||
unset($a_dnsmasq['local_ttl']);
|
||||
}
|
||||
|
||||
write_config();
|
||||
system_resolvconf_generate();
|
||||
|
||||
system_resolver_configure();
|
||||
dnsmasq_configure_do();
|
||||
plugins_configure('dhcp');
|
||||
|
||||
header(url_safe('Location: /services_dnsmasq.php'));
|
||||
exit;
|
||||
}
|
||||
} elseif (isset($pconfig['apply'])) {
|
||||
filter_configure();
|
||||
system_resolvconf_generate();
|
||||
system_hosts_generate();
|
||||
system_resolver_configure();
|
||||
dnsmasq_configure_do();
|
||||
plugins_configure('dhcp');
|
||||
clear_subsystem_dirty('hosts');
|
||||
|
||||
@ -98,7 +98,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$config['system']['dnsallowoverride'] = true;
|
||||
}
|
||||
write_config('OpenDNS filter configuration change');
|
||||
system_resolvconf_generate();
|
||||
system_resolver_configure();
|
||||
plugins_configure('dhcp');
|
||||
$savemsg = get_std_save_message();
|
||||
}
|
||||
|
||||
@ -63,9 +63,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig = $_POST;
|
||||
|
||||
if (!empty($pconfig['apply'])) {
|
||||
system_resolvconf_generate(); /* checks for 'enable' */
|
||||
system_resolver_configure();
|
||||
unbound_configure_do();
|
||||
plugins_configure('dhcp'); /* checks for 'enable' */
|
||||
plugins_configure('dhcp');
|
||||
clear_subsystem_dirty('unbound');
|
||||
header(url_safe('Location: /services_unbound.php'));
|
||||
exit;
|
||||
|
||||
@ -363,7 +363,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
|
||||
filter_configure();
|
||||
system_login_configure();
|
||||
system_hosts_generate();
|
||||
system_resolver_confiugure();
|
||||
plugins_configure('dns');
|
||||
plugins_configure('dhcp');
|
||||
configd_run('openssh restart', true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user