From 5af0a890a400a41d192fe02c743460a3ec904bae Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 7 Dec 2016 21:39:21 -0500 Subject: [PATCH] Add messages to trace the ntpd commands in genesis --- xCAT-genesis-scripts/bin/doxcat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index e03df7a83..6a637fb91 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -262,18 +262,24 @@ openssl genrsa -out /etc/xcat/certkey.pem 4096 > /dev/null 2>&1 & logger -s -t $log_label -p local4.info "Acquired IPv4 address on $bootnic" ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet|awk '{print $2}' + +logger -s -t $log_label -p local4.info "Starting ntpd..." ntpd -g -x if [ -e "/dev/rtc" ]; then + logger -s -t $log_label -p local4.info "Attempting to sync hardware clock..." ( sleep 8 ; hwclock --systohc ) /dev/null 2>&1 & disown fi # rv 0 state does not work with the new ntp versions +logger -s -t $log_label -p local4.info "Checking ntpq for the offset values..." while [ "`ntpq -c 'rv 0 offset' | awk -F '=' '/offset=/ { print $2 }' | awk -F '.' '{ print $1 }' | sed s/-//`" -ge 1000 ]; do sleep 1 done +logger -s -t $log_label -p local4.info "Checking ntpq for the offset values... Done" +logger -s -t $log_label -p local4.info "Restarting syslog..." read -r RSYSLOG_PID /dev/null kill "$RSYSLOG_PID" 2>/dev/null while kill -0 "$RSYSLOG_PID" 2>/dev/null