2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

Add Node name to the /opt/xcat/xcatinfo for diskfull installation (#4190)

This commit is contained in:
cxhong 2017-10-26 22:28:52 -04:00 committed by yangsong
parent e4d18dd895
commit 6263ef39cd

View File

@ -10,6 +10,7 @@ if [ -f /xcatpost/mypostscript.post ]; then
XCATDEBUGMODE=`grep 'XCATDEBUGMODE=' /xcatpost/mypostscript.post |cut -d= -f2 | tr -d \'\" | tr A-Z a-z `
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`
fi
@ -74,6 +75,15 @@ if [ $? -eq 0 ]; then
else
echo "REBOOT=TRUE" >> /opt/xcat/xcatinfo
fi
#add node name to xcatinfo
grep 'NODE' /opt/xcat/xcatinfo > /dev/null 2>&1
if [ $? -eq 0 ]; then
sed -i "s/NODE=.*/NODE=$NODE/" /opt/xcat/xcatinfo
else
echo "NODE=$NODE" >> /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