From d11bfe8ee82484f7133ebcafd2c8f2bed3cc6be7 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 13 Jun 2008 12:22:20 +0000 Subject: [PATCH] fixed for AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1648 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/setupntp | 41 ++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index f772b0f15..3c610a13d 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -43,25 +43,44 @@ else fi -mkdir -p /var/lib/ntp -chown ntp /var/lib/ntp +if [[ $OSTYPE = linux* ]]; then + mkdir -p /var/lib/ntp + chown ntp /var/lib/ntp -echo "driftfile /var/lib/ntp/drift + echo "driftfile /var/lib/ntp/drift disable auth restrict 127.0.0.1" >>$conf_file #service ntpd restart -service ntpd stop -logger -t xcat "ntpdate -t5 $master " -ntpdate -t5 $master -if [ "$?" != "0" ] + service ntpd stop + logger -t xcat "ntpdate -t5 $master " + ntpdate -t5 $master + if [ "$?" != "0" ] then - echo_failure echo echo " ntpdate -t5 $master failed" logger -t xcat "ntpdate -t5 $master failed" -fi + fi -service ntpd start -chkconfig --level 345 ntpd on + service ntpd start + chkconfig --level 345 ntpd on +else +# stop and start AIX ntp + echo "driftfile /etc/ntp.drift +tracefile /etc/ntp.trace +disable auth +broadcastclient +restrict 127.0.0.1" >>$conf_file + + stopsrc -s xntpd + logger -t xcat "ntpdate -t5 $master " + ntpdate -t5 $master + if [ "$?" != "0" ] + then + echo + echo " ntpdate -t5 $master failed " + logger -t xcat "ntpdate -t5 $master failed" + fi + startsrc -s xntpd +fi exit $?