diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-12 19:42:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-12 19:42:43 +0000 |
commit | 88e46869c7c91d37a1bde12df6118ecfb8093f3e (patch) | |
tree | bc7108ccb497af7f4749a29422cc107b2bfe6b8e /usr/local/sbin | |
parent | 3ea11e7d6f8b3b61784435457d0bcb07b3e2b5ad (diff) | |
download | pfsense-88e46869c7c91d37a1bde12df6118ecfb8093f3e.zip pfsense-88e46869c7c91d37a1bde12df6118ecfb8093f3e.tar.gz |
* Use defined server from config.xml
* Sleep for 5 seconds in between requests
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/ntpdate_sync_once.sh | 4 |
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. |