From 34a15895890b10d8d5c4610c1860748a73d25d56 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 8 Feb 2010 05:41:42 +0000 Subject: [PATCH] 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 --- xCAT/postscripts/setupntp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index 833acdfce..3ef99afd2 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -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