2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 11:10:24 +00:00

Add image name to /opt/xcat/xcatinfo on compute node (#4359)

This commit is contained in:
cxhong
2017-11-22 08:40:18 -05:00
committed by yangsong
parent 6315852abd
commit da7df78fd2

View File

@@ -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