From 719c6d0de33accdc21bbad5d95048e512f988bc0 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 25 Mar 2015 03:47:05 -0700 Subject: [PATCH] fix defect #4616 On rhels7.x env, stateful node status will be failed duo to privision nic is not ready when run postscript --- xCAT/postscripts/xcatinstallpost | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index a45219b93..1f7fb68ae 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -12,11 +12,12 @@ fi SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}') sleep $SLI - +MACADDR=`grep MACADDRESS= /xcatpost/mypostscript.post |awk -F = '{print $2}'|sed s/\'//g` +INSTALLNIC=`ip -o link|grep -i $MACADDR|awk '{print $2}'|sed s/://` #the nics have not been configured when running the PBS sometimes, need to make sure... RETRY=0 -until ip -4 --oneline addr show|grep -v 127.0.0.1 >/dev/null +until ip -4 --oneline addr show dev $INSTALLNIC|grep inet >/dev/null do sleep 2 RETRY=$[ $RETRY + 1 ]