made update node work for hardeth case
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4113 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1570da4d20
commit
96d4832d75
@ -41,6 +41,10 @@ echo "$TMP" > /opt/xcat/xcatdsklspost
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
|
||||
#something Jarrod knows
|
||||
sed -i 's/^serial/#serial/' /boot/grub/menu.lst
|
||||
sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst
|
||||
|
@ -40,6 +40,10 @@ echo "$TMP" > /opt/xcat/xcatdsklspost
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
|
||||
export MASTER_IP="#XCATVAR:XCATMASTER#"
|
||||
export MASTER_IPS="#XCATVAR:XCATMASTER#"
|
||||
export MASTER="#XCATVAR:XCATMASTER#"
|
||||
|
@ -68,6 +68,10 @@ EOF
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
]]>
|
||||
|
||||
</source>
|
||||
|
@ -42,6 +42,10 @@ EOF
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
]]>
|
||||
|
||||
</source>
|
||||
|
@ -68,6 +68,10 @@ EOF
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
]]>
|
||||
|
||||
</source>
|
||||
|
@ -51,6 +51,10 @@ EOF
|
||||
chmod 755 /opt/xcat/xcatdsklspost
|
||||
|
||||
chkconfig --add xcatpostinit
|
||||
|
||||
cat >/opt/xcat/xcatinfo << EOF
|
||||
XCATSERVER=#XCATVAR:XCATMASTER#
|
||||
EOF
|
||||
]]>
|
||||
|
||||
</source>
|
||||
|
@ -33,6 +33,36 @@ if [ "$OSVER" = "11" ]; then
|
||||
SIP=`echo $SIP |awk -F\' '{print $2}'` #trim '
|
||||
fi
|
||||
|
||||
#open the xcatinfo file to look for the master if it is not set
|
||||
frominfofile=0
|
||||
if [ -z $SIP ]; then
|
||||
if [ -f /opt/xcat/xcatinfo ]; then
|
||||
SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2`
|
||||
frominfofile=1
|
||||
fi
|
||||
fi
|
||||
|
||||
#no hope, now let's get out here.
|
||||
if [ -z $SIP ]; then
|
||||
hn=`hostname`
|
||||
echo "Cannot find the xCAT server for node $hn"
|
||||
exit
|
||||
fi
|
||||
|
||||
#save the SIP into the xcatinfo file
|
||||
if [ $frominfofile -eq 0 ]; then
|
||||
if [ ! -f /opt/xcat/xcatinfo ]; then
|
||||
mkdir -p /opt/xcat
|
||||
touch /opt/xcat/xcatinfo
|
||||
fi
|
||||
grep 'XCATSERVER' /opt/xcat/xcatinfo 2>&1 > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "s/XCATSERVER=.*/XCATSERVER=$SIP/" /opt/xcat/xcatinfo
|
||||
else
|
||||
echo "XCATSERVER=$SIP" >> /opt/xcat/xcatinfo
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep 'rw /rw tmpfs ' /proc/mounts >& /dev/null; then
|
||||
touch /var/lock/subsys/xcatmounts
|
||||
echo '#!/bin/bash' > /etc/rc6.d/K10xcatmounts
|
||||
|
Loading…
Reference in New Issue
Block a user