summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-09 03:04:03 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-09 03:04:03 +0000
commit4f46cd861d2ac72f65a53c2d695967a4adc4bf5b (patch)
tree5d8307aac7e2813f8851ccc08e684f4bd87a5368 /etc
parentfbc6ad9585ab49333bbace5702a7fc67e016ec3c (diff)
downloadpfsense-4f46cd861d2ac72f65a53c2d695967a4adc4bf5b.zip
pfsense-4f46cd861d2ac72f65a53c2d695967a4adc4bf5b.tar.gz
* Move time scripts much earlier. It will now kick off initially
from the ntp once script
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc5
-rwxr-xr-xetc/rc.bootup10
2 files changed, 8 insertions, 7 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 1254e55..3753154 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -1047,14 +1047,15 @@ function system_ntp_configure() {
/* if openntpd is running, kill it */
while(is_process_running("ntpd")) {
mwexec("/usr/bin/killall ntpd", true);
- sleep(3);
+ sleep(1);
}
/* if /var/empty does not exist, create it */
if(!is_dir("/var/empty"))
exec("/bin/mkdir -p /var/empty && chmod ug+rw /var/empty/.");
- sleep(1);
+ if($g['booting'])
+ return;
/* start opentpd, set time now and use /var/etc/ntpd.conf */
exec("/usr/local/sbin/ntpd -s -f {$g['varetc_path']}/ntpd.conf");
diff --git a/etc/rc.bootup b/etc/rc.bootup
index 6f9ab04..1f27299 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -171,6 +171,11 @@
/* check if the wan interface is up, this might delay upto 10 seconds */
is_wan_interface_up("wan");
+ /* start the NTP client */
+ echo "Starting OpenNTP time client...";
+ system_ntp_configure();
+ echo "done.\n";
+
/* Launch on bootup and keep trying to sync. Exit once time/date has been sync'd. */
mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh");
@@ -295,11 +300,6 @@
/* enable watchdog if supported */
enable_watchdog();
- /* start the NTP client */
- echo "Starting OpenNTP time client...";
- system_ntp_configure();
- echo "done.\n";
-
/* if <system><afterbootupshellcmd> exists, execute the command */
if($config['system']['afterbootupshellcmd'] <> "")
mwexec($config['system']['afterbootupshellcmd']);
OpenPOWER on IntegriCloud