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

Modify the waiting time clearer for user for ntp-wait

This commit is contained in:
ertaozh
2017-03-21 05:27:52 -04:00
parent 38d9914d35
commit 38831c8358

View File

@ -266,9 +266,11 @@ ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|
logger -s -t $log_label -p local4.info "Starting ntpd..."
ntpd -g -x
NTP_WAIT_SECONDS=60
logger -s -t $log_label -p local4.info "Waiting $NTP_WAIT_SECONDS seconds for ntpd to synchronize..."
ntp-wait -n $NTP_WAIT_SECONDS -s 1 -v
# ntp-wait defaults to 6 seconds between retries, wait for 1 minute
NTP_TRIES=10
NTP_SLEEP=6
logger -s -t $log_label -p local4.info "Waiting for $NTP_TRIES x $NTP_SLEEP seconds for ntpd to synchronize..."
ntp-wait -n $NTP_TRIES -s $NTP_SLEEP -v
if [ $? -ne 0 ]
then
logger -s -t $log_label -p local4.info "... ntpd did not synchronize."