From fe545184b5730e866c32cf8542c4885acb58689c Mon Sep 17 00:00:00 2001 From: ligc Date: Wed, 26 Mar 2014 14:23:28 -0500 Subject: [PATCH] gensis-scripts: doxcat - ntpq -c rv state does not work any more, use the ntpq -c rv offset instead --- xCAT-genesis-scripts/bin/doxcat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index af49141e3..6ff5504c9 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -103,7 +103,9 @@ done echo -n "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}' ntpd -g -x -(while ! ntpq -c "rv 0 state"|grep 'state=4' > /dev/null; do sleep 1; done; hwclock --systohc) & +# rv 0 state does not work with the new ntp versions +#(while ! ntpq -c "rv 0 state"|grep 'state=4' > /dev/null; do sleep 1; done; hwclock --systohc) & +(while [ "`ntpq -c \"rv 0 offset\" | grep \"offset=\" | awk -F \"=\" '{print $2}' | awk -F \".\" '{print $1}'`" -ge 1000 ]; do sleep 1; done; hwclock --systohc) & if dmidecode|grep IPMI > /dev/null; then modprobe ipmi_si modprobe ipmi_devintf