From 38d9914d353d75d874e5ef7d4b7d07ad6eaf1b3f Mon Sep 17 00:00:00 2001 From: ertaozh Date: Thu, 9 Mar 2017 01:45:05 -0500 Subject: [PATCH 1/2] Have ntp sync up waiting for 1 minute in case sync up failed --- xCAT-genesis-scripts/bin/doxcat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index 0f39e1e89..434252519 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -266,8 +266,9 @@ 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 -logger -s -t $log_label -p local4.info "Waiting for ntpd to synchronize..." -ntp-wait -n 1999 -s 1 -v +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 if [ $? -ne 0 ] then logger -s -t $log_label -p local4.info "... ntpd did not synchronize." From 38831c8358ec61893cd81376b64db3e4485797a7 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 21 Mar 2017 05:27:52 -0400 Subject: [PATCH 2/2] Modify the waiting time clearer for user for ntp-wait --- xCAT-genesis-scripts/bin/doxcat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index 434252519..18efbc2e8 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -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."