From 4d262b0db464cfda7e02056b7204f3a42f6072a5 Mon Sep 17 00:00:00 2001 From: ligc Date: Wed, 26 Mar 2014 16:02:16 -0500 Subject: [PATCH] doxcat: the ntp -c rv 0 offset may return negative number --- xCAT-genesis-scripts/bin/doxcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index 6ff5504c9..4a383982f 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -105,7 +105,7 @@ ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6| ntpd -g -x # 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) & +(while [ "`ntpq -c \"rv 0 offset\" | grep \"offset=\" | awk -F \"=\" '{print $2}' | awk -F \".\" '{print $1}' | sed s/-//`" -ge 1000 ]; do sleep 1; done; hwclock --systohc) & if dmidecode|grep IPMI > /dev/null; then modprobe ipmi_si modprobe ipmi_devintf