diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index fc4967375..e852799db 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -11,6 +11,7 @@ if [ -f /xcatpost/mypostscript.post ]; then MASTER_IP=`grep '^MASTER_IP=' /xcatpost/mypostscript.post |cut -d= -f2|sed s/\'//g` OSVER=`grep '^OSVER=' /xcatpost/mypostscript.post |cut -d= -f2|sed s/\'//g` NODE=`grep '^NODE=' /xcatpost/mypostscript.post |cut -d= -f2|sed s/\'//g` + IMAGE=`grep '^PROVMETHOD=' /xcatpost/mypostscript.post |cut -d= -f2|sed s/\'//g` fi @@ -84,6 +85,14 @@ else echo "NODE=$NODE" >> /opt/xcat/xcatinfo fi +#add image name to xcatinfo +grep 'IMAGENAME' /opt/xcat/xcatinfo > /dev/null 2>&1 +if [ $? -eq 0 ]; then + sed -i "s/IMAGENAME=.*/IMAGENAME=$IMAGE/" /opt/xcat/xcatinfo +else + echo "IMAGENAME=$IMAGE" >> /opt/xcat/xcatinfo +fi + # Store the SERVICEGROUP into the xcatinfo file for statful installation sn_group=`grep '^SERVICEGROUP' /xcatpost/mypostscript |cut -d= -f2 | tr -d \'\"` if [ "x" != "x$sn_group" ]; then