ntpdate is deprecated on SLES11, use ntpd -q -g instead

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5187 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-02-08 05:41:42 +00:00
parent ba3115b765
commit 34a1589589

View File

@ -57,6 +57,17 @@ fi
#service ntpd restart
service $SERVICE stop
#ntpdate program is deprecated on SuSE
if [[ $OSVER = sles* ]] || [[ $OSVER = suse* ]] || [[ -f /etc/SuSE-release ]]; then
logger -t xcat "ntpd -q -g"
ntpd -q -g
if [ "$?" != "0" ]
then
echo
echo " ntpd -q -g failed"
logger -t xcat "ntpd -q -g failed"
fi
else
logger -t xcat "ntpdate -t5 $master "
ntpdate -t5 $master
if [ "$?" != "0" ]
@ -65,10 +76,11 @@ fi
echo " ntpdate -t5 $master failed"
logger -t xcat "ntpdate -t5 $master failed"
fi
fi
service $SERVICE start
chkconfig --add $SERVICE
chkconfig --level 345 $SERVICE on
chkconfig --add $SERVICE >/dev/null 2>&1
chkconfig --level 345 $SERVICE on >/dev/null 2>&1
else
# stop and start AIX ntp
echo "driftfile /etc/ntp.drift