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:
Franco Fichtner 2023-03-02 08:35:19 +01:00
parent 4c84f442c8
commit 412c0c7b71
9 changed files with 14 additions and 14 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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();

View File

@ -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');

View File

@ -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();
}

View File

@ -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;

View File

@ -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);