This commit is contained in:
Franco Fichtner 2016-11-14 23:00:38 +01:00
parent b74970ee60
commit a711740da7
2 changed files with 13 additions and 16 deletions

View File

@ -1500,7 +1500,7 @@ function system_ntp_setup_pps($serialport)
return true;
}
function system_ntp_configure($start_ntpd = true)
function system_ntp_configure($start_ntpd = true, $verbose = false)
{
global $config;
@ -1513,6 +1513,11 @@ function system_ntp_configure($start_ntpd = true)
return;
}
if ($verbose) {
echo 'Starting NTP service...';
flush();
}
$driftfile = '/var/db/ntpd.drift';
$statsdir = '/var/log/ntp';
$gps_device = '/dev/gps0';
@ -1758,6 +1763,9 @@ function system_ntp_configure($start_ntpd = true)
if (!$start_ntpd) {
/* write out the config and delay startup */
mwexec_bg('/usr/local/sbin/ntpdate_sync_once.sh');
if ($verbose) {
echo "deferred.\n";
}
return;
}
@ -1770,8 +1778,9 @@ function system_ntp_configure($start_ntpd = true)
array('/var/etc/ntpd.conf', '/var/run/ntpd.pid')
);
// Note that we are starting up
log_error("NTPD is starting up.");
if ($verbose) {
echo "done.\n";
}
}
function system_halt($sync = false)

View File

@ -179,23 +179,11 @@ echo "Configuring CRON...";
configure_cron();
echo "done.\n";
/* set up static routes */
system_routing_configure();
/* enable routing */
system_routing_enable();
/* start dnsmasq service */
services_dnsmasq_configure(true);
/* start unbound service */
services_unbound_configure(true);
/* Do an initial time sync */
echo "Starting NTP time client...";
system_ntp_configure(false);
echo "done.\n";
system_ntp_configure(false, true);
services_dhcpd_configure('all', array(), true);
services_dhcpleases_configure();
services_dhcrelay_configure(true);