mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
services: mostly $verbose changes
This commit is contained in:
parent
27b8a76d44
commit
8c6ec244b0
@ -151,15 +151,15 @@ function ntpd_configure_pps($serialport)
|
||||
|
||||
function ntpd_configure_start($verbose = false)
|
||||
{
|
||||
ntpd_configure_do(true, $verbose);
|
||||
ntpd_configure_do($verbose, true);
|
||||
}
|
||||
|
||||
function ntpd_configure_defer($verbose = false)
|
||||
{
|
||||
ntpd_configure_do(false, $verbose);
|
||||
ntpd_configure_do($verbose, false);
|
||||
}
|
||||
|
||||
function ntpd_configure_do($start_ntpd = true, $verbose = false)
|
||||
function ntpd_configure_do($verbose = false, $start_ntpd = true)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ function get_pppoes_child_interfaces($ifpattern)
|
||||
return $if_arr;
|
||||
}
|
||||
|
||||
function services_radvd_configure($blacklist = array())
|
||||
function services_radvd_configure($verbose = false, $blacklist = array())
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -108,6 +108,11 @@ function services_radvd_configure($blacklist = array())
|
||||
return;
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo 'Starting router advertisement service...';
|
||||
flush();
|
||||
}
|
||||
|
||||
$radvdconf = "# Automatically generated, do not edit\n";
|
||||
|
||||
/* Process all links which need the router advertise daemon */
|
||||
@ -155,7 +160,7 @@ function services_radvd_configure($blacklist = array())
|
||||
}
|
||||
}
|
||||
|
||||
$radvdconf .= "# Generated for DHCPv6 Server $dhcpv6if\n";
|
||||
$radvdconf .= "# Generated for DHCPv6 server $dhcpv6if\n";
|
||||
$radvdconf .= "interface {$realif} {\n";
|
||||
$radvdconf .= sprintf("\tAdvSendAdvert %s;\n", !empty($dhcpv6ifconf['ranosend']) ? 'off' : 'on');
|
||||
$radvdconf .= sprintf("\tMinRtrAdvInterval %s;\n", !empty($dhcpv6ifconf['ramininterval']) ? $dhcpv6ifconf['ramininterval'] : '200');
|
||||
@ -385,6 +390,10 @@ function services_radvd_configure($blacklist = array())
|
||||
if (count($radvdifs)) {
|
||||
mwexec('/usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog');
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo "done.\n";
|
||||
}
|
||||
}
|
||||
|
||||
function services_dhcpd_leasesfile()
|
||||
@ -416,8 +425,8 @@ function services_dhcpd_configure($verbose = false, $family = 'all', $blacklist
|
||||
}
|
||||
|
||||
if ($family == 'all' || $family == 'inet6') {
|
||||
services_dhcpdv6_configure($blacklist, $verbose);
|
||||
services_radvd_configure($blacklist);
|
||||
services_dhcpdv6_configure($verbose, $blacklist);
|
||||
services_radvd_configure($verbose, $blacklist);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1086,7 +1095,7 @@ function is_dhcpv6_server_enabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
function services_dhcpdv6_configure($blacklist = array(), $verbose = false)
|
||||
function services_dhcpdv6_configure($verbose = false, $blacklist = array())
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -1476,7 +1485,7 @@ function services_dhcrelay_configure($verbose = false)
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo 'Starting DHCPv4 Relay...';
|
||||
echo 'Starting DHCPv4 relay...';
|
||||
flush();
|
||||
}
|
||||
|
||||
@ -1595,7 +1604,7 @@ function services_dhcrelay6_configure($verbose = false)
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo 'Starting DHCPv6 Relay...';
|
||||
echo 'Starting DHCPv6 relay...';
|
||||
flush();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user