support xcat genesis on ppc64: check if the dmidecode exists before run dmidecode

This commit is contained in:
ligc 2014-08-21 03:42:12 -04:00
parent 79ad455b31
commit 7ae7479c3a

View File

@ -176,9 +176,11 @@ 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}' | sed s/-//`" -ge 1000 ]; do sleep 1; done; hwclock --systohc) &
if dmidecode|grep IPMI > /dev/null; then
modprobe ipmi_si
modprobe ipmi_devintf
if [ -f "/usr/sbin/dmidecode" ]; then
if dmidecode|grep IPMI > /dev/null; then
modprobe ipmi_si
modprobe ipmi_devintf
fi
fi
DEVICE=$bootnic
export DEVICE