2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-06 05:20:09 +00:00

Remove trailing spaces in file xCAT/postscripts/setupntp.traditional

This commit is contained in:
GONG Jie 2017-12-31 23:59:59 +00:00
parent f84a4b5e64
commit 90cd651f1d

View File

@ -44,7 +44,7 @@ is_lsb_cumulus ()
}
logger -t xcat "Install: Setup NTP"
# Use the ntpservers defined in the site table, if they exist.
# Use the ntpservers defined in the site table, if they exist.
# If the value of ntpservers is <xcatmaster> use the service node or
# the management node as the ntp server.
if [ $NTPSERVERS ]; then
@ -68,7 +68,7 @@ if [ $NTPSERVERS ]; then
master=$i
setup=1
fi
done
done
if [ $setup -eq 0 ]; then
echo "server $master" >$conf_file
fi
@ -92,9 +92,9 @@ if [ $OS_TYPE = Linux ]; then
chown ntp /var/lib/ntp
if ( pmatch $OSVER "sles*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ];then
echo "driftfile /var/lib/ntp/drift/ntp.drift" >>$conf_file
else
else
echo "driftfile /var/lib/ntp/drift" >>$conf_file
fi
fi
echo "disable auth" >>$conf_file
echo "restrict 127.0.0.1" >>$conf_file
@ -117,7 +117,7 @@ if [ $OS_TYPE = Linux ]; then
fi
msg='syncing the clock ...'
logger -t xcat $msg
logger -t xcat $msg
echo $msg
if ! timeout 120 ntpd -gq > /dev/null 2>&1 ; then
if ! ntpdate -t5 $master > /dev/null 2>&1; then
@ -192,14 +192,14 @@ disable auth
broadcastclient
restrict 127.0.0.1" >>$conf_file
stopsrc -s xntpd
stopsrc -s xntpd
logger -t xcat "ntpdate -t5 $master "
ntpdate -t5 $master
ntpdate -t5 $master
if [ "$?" != "0" ]
then
echo " ntpdate -t5 $master failed "
logger -t xcat "ntpdate -t5 $master failed"
fi
/usr/sbin/chrctcp -S -a xntpd
/usr/sbin/chrctcp -S -a xntpd
fi
exit $exit_code
exit $exit_code