mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
ntpd: only consumer of sigprogmask magic; can probably do without
This commit is contained in:
parent
4c3488138e
commit
fb97ab7c6d
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user