Commit fb97ab7c authored by Franco Fichtner's avatar Franco Fichtner

ntpd: only consumer of sigprogmask magic; can probably do without

parent 4c348813
......@@ -1553,9 +1553,11 @@ function system_ntp_configure($start_ntpd = true)
return;
}
/* At bootup we just want to write out the config. */
if (!$start_ntpd)
if (!$start_ntpd) {
/* write out the config and delay startup */
mwexec_bg('/usr/local/sbin/ntpdate_sync_once.sh');
return;
}
/* if ntpd is running, kill it */
while (isvalidpid('/var/run/ntpd.pid')) {
......@@ -1567,7 +1569,10 @@ function system_ntp_configure($start_ntpd = true)
@mkdir('/var/empty', 0775, true);
/* start opentpd, set time now and use new config */
mwexec('/usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid', false, true);
mwexecf(
'/usr/local/sbin/ntpd -g -c %s -p %s',
array('/var/etc/ntpd.conf', '/var/run/ntpd.pid')
);
// Note that we are starting up
log_error("NTPD is starting up.");
......
......@@ -259,9 +259,7 @@ services_unbound_configure();
/* Do an initial time sync */
echo "Starting NTP time client...";
/* At bootup this will just write the config, ntpd will launch from ntpdate_sync_once.sh */
system_ntp_configure(false);
mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh", false, true);
echo "done.\n";
/* start load balancer daemon */
......
......@@ -200,7 +200,6 @@ if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interface
/* reconfigure ntpd */
system_ntp_configure(false);
mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh", false, true);
}
/* signal filter reload */
......
......@@ -160,4 +160,3 @@ services_igmpproxy_configure();
/* reconfigure ntpd */
system_ntp_configure(false);
mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh", false, 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