diff options
author | jim-p <jimp@pfsense.org> | 2012-05-16 10:48:26 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-05-16 10:48:26 -0400 |
commit | 0b8e9d38d8bc8a53b4e6bb503f487dae425ca3fd (patch) | |
tree | 876c344332e9ed7c0f970e41f44aafeae455f14c /etc/inc/system.inc | |
parent | 11e069064b417cacbd56f7f557b131af3c10fb86 (diff) | |
download | pfsense-0b8e9d38d8bc8a53b4e6bb503f487dae425ca3fd.zip pfsense-0b8e9d38d8bc8a53b4e6bb503f487dae425ca3fd.tar.gz |
On its own, ntpd does not sync fast enough at bootup, so bring back the ntpdate sync but improve it so it can't get stuck forever.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index bb7ed11..b22d170 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1249,7 +1249,7 @@ function system_timezone_configure() { echo gettext("done.") . "\n"; } -function system_ntp_configure() { +function system_ntp_configure($start_ntpd=true) { global $config, $g; $driftfile = "/var/db/ntpd.drift"; @@ -1277,6 +1277,10 @@ function system_ntp_configure() { /* slurp! */ fclose($fd); + /* At bootup we just want to write out the config. */ + if (!$start_ntpd) + return; + /* if ntpd is running, kill it */ while(is_process_running("ntpd")) { killbyname("ntpd"); @@ -1294,7 +1298,7 @@ function system_ntp_configure() { // Note that we are starting up log_error("NTPD is starting up."); - + return; } function sync_system_time() { |