Commit a711740d authored by Franco Fichtner's avatar Franco Fichtner

ntp: #1256

parent b74970ee
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment