summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-12 19:42:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-12 19:42:43 +0000
commit88e46869c7c91d37a1bde12df6118ecfb8093f3e (patch)
treebc7108ccb497af7f4749a29422cc107b2bfe6b8e /usr
parent3ea11e7d6f8b3b61784435457d0bcb07b3e2b5ad (diff)
downloadpfsense-88e46869c7c91d37a1bde12df6118ecfb8093f3e.zip
pfsense-88e46869c7c91d37a1bde12df6118ecfb8093f3e.tar.gz
* Use defined server from config.xml
* Sleep for 5 seconds in between requests
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ntpdate_sync_once.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/sbin/ntpdate_sync_once.sh b/usr/local/sbin/ntpdate_sync_once.sh
index dbcf170..508ce3e 100755
--- a/usr/local/sbin/ntpdate_sync_once.sh
+++ b/usr/local/sbin/ntpdate_sync_once.sh
@@ -1,12 +1,14 @@
#!/bin/sh
NOTSYNCED="true"
+SERVER=`cat /cf/conf/config.xml | grep timeservers | cut -d">" -f2 | cut -d"<" -f1`
while [ "$NOTSYNCED" = "true" ]; do
- ntpdate "0.pfsense.pool.ntp.org"
+ ntpdate $SERVER
if [ "$?" = "0" ]; then
NOTSYNCED="false"
fi
+ sleep 5
done
# Launch -- we have net.
OpenPOWER on IntegriCloud