From cd11a1426d3c140918a74cb7e3efc500644e220c Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 12 Apr 2011 13:52:34 -0400 Subject: Drop the ntpdate sync in favor of using ntpd -s, which should have the same net effect without needing the shell script that has been prone to hanging. --- etc/inc/system.inc | 3 --- etc/rc.bootup | 3 --- etc/rc.newwanip | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index c71fb38..2e64099 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1192,9 +1192,6 @@ function system_ntp_configure() { if(!is_dir("/var/empty")) exec("/bin/mkdir -p /var/empty && chmod ug+rw /var/empty/."); - 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 6cff6ac..e71c430 100755 --- a/etc/rc.bootup +++ b/etc/rc.bootup @@ -289,9 +289,6 @@ 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"); - /* start DHCP service */ services_dhcpd_configure(); diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 654d0dd..0395099 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -49,7 +49,7 @@ function restart_packages() { global $oldip, $curwanipi, $g; /* restart packages */ - mwexec_bg("/usr/local/sbin/ntpdate_sync_once.sh"); + system_ntp_configure(); log_error("{$g['product_name']} package system has detected an ip change $oldip -> $curwanip ... Restarting packages."); mwexec_bg("/etc/rc.start_packages"); } -- cgit v1.1