Update of /cvsroot/devil-linux/build/scripts/scripts
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11211
Modified Files:
xntpd
Log Message:
- configuration was simplifyed a bit
Index: xntpd
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/xntpd,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xntpd 25 Jul 2005 17:16:58 -0000 1.6
+++ xntpd 14 Jan 2009 19:48:43 -0000 1.7
@@ -47,11 +47,12 @@
case "$1" in
start)
- if [ -s /etc/ntp/step-tickers ]; then
- echo -n "Synchronizing with time server: "
- loadproc /usr/bin/ntpdate -s -b -p 8 -u \
- `sed -e 's/#.*//' /etc/ntp/step-tickers`
+ NTP_SERVERS=$(grep server /etc/ntp.conf | grep -v "^#\|^$\|127\." | awk '{ print $2 }')
+ if [ x"$NTP_SERVERS" != "x" ]; then
+ echo -n "Synchronizing with time servers:" $NTP_SERVERS
+ loadproc /usr/bin/ntpdate -s -b -p 8 -u $NTP_SERVERS
fi
+
if [ -f /etc/sysconfig/jail/$PACKAGE_NAME ] && [ "$JAIL_ENABLE" == yes ]; then
/etc/init.d/jail start $PACKAGE_NAME
fi
|