Fix for bug #3391028
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10282 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
eea5c1c769
commit
e58d4adf3d
@ -33,7 +33,7 @@ hostname $HOSTNAME
|
||||
export MASTER_IP="#XCATVAR:XCATMASTER#"
|
||||
export MASTER_IPS="#XCATVAR:XCATMASTER#"
|
||||
export MASTER="#XCATVAR:XCATMASTER#"
|
||||
cd /tmp
|
||||
cd /var/tmp
|
||||
RAND=$(perl -e 'print int(rand(50)). "\n"')
|
||||
sleep $RAND
|
||||
for i in $(seq 1 20)
|
||||
@ -55,8 +55,8 @@ do
|
||||
mv $i/postscripts /xcatpost
|
||||
rm -rf $i
|
||||
chmod +x /xcatpost/*
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript
|
||||
MYCONT=`grep MASTER /tmp/mypostscript`
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /var/tmp/mypostscript
|
||||
MYCONT=`grep MASTER /var/tmp/mypostscript`
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
while [ -z "$MYCONT" ]; do
|
||||
@ -68,12 +68,12 @@ do
|
||||
|
||||
let SLI=$RANDOM%10+10
|
||||
sleep $SLI
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript
|
||||
MYCONT=`grep MASTER /tmp/mypostscript`
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /var/tmp/mypostscript
|
||||
MYCONT=`grep MASTER /var/tmp/mypostscript`
|
||||
done
|
||||
|
||||
|
||||
chmod +x /tmp/mypostscript
|
||||
chmod +x /var/tmp/mypostscript
|
||||
GOTIT=1
|
||||
break
|
||||
fi
|
||||
@ -97,10 +97,10 @@ cd /xcatpost
|
||||
#/xcatpost/#TABLE:nodelist:THISNODE:node#
|
||||
export PATH=/xcatpost:$PATH
|
||||
|
||||
#save the postboot scripts to /tmp/mypostscript.post
|
||||
TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" /tmp/mypostscript`
|
||||
echo "$TMP" > /tmp/mypostscript.post
|
||||
chmod 755 /tmp/mypostscript.post
|
||||
#save the postboot scripts to /var/tmp/mypostscript.post
|
||||
TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" /var/tmp/mypostscript`
|
||||
echo "$TMP" > /var/tmp/mypostscript.post
|
||||
chmod 755 /var/tmp/mypostscript.post
|
||||
|
||||
#create the post init
|
||||
cat >/etc/init.d/xcatpostinit1 << 'EOF'
|
||||
@ -116,10 +116,10 @@ EOF
|
||||
chmod 755 /opt/xcat/xcatinstallpost
|
||||
|
||||
#only run the prebooot scripts here
|
||||
TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript`
|
||||
echo "$TMP" > /tmp/mypostscript
|
||||
TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /var/tmp/mypostscript`
|
||||
echo "$TMP" > /var/tmp/mypostscript
|
||||
|
||||
/tmp/mypostscript
|
||||
/var/tmp/mypostscript
|
||||
export NODE=#TABLE:nodelist:THISNODE:node#
|
||||
export OSVER=#TABLE:nodetype:THISNODE:os#
|
||||
export ARCH=#TABLE:nodetype:THISNODE:arch#
|
||||
@ -136,6 +136,6 @@ sed -i 's/\(deb.*security.*\)/#\1/' /etc/apt/sources.list
|
||||
updateflag.awk $MASTER 3002
|
||||
cd /
|
||||
#rm -Rf /xcatpost
|
||||
#rm -f /tmp/mypostscript
|
||||
#rm -f /var/tmp/mypostscript
|
||||
exit 0
|
||||
|
||||
|
@ -20,7 +20,7 @@ export PATH
|
||||
chmod +x /xcatpost/*;
|
||||
|
||||
if [ -x /usr/bin/openssl ]; then
|
||||
SIP=`grep "^MASTER=" /tmp/mypostscript.post |cut -d= -f2`
|
||||
SIP=`grep "^MASTER=" /var/tmp/mypostscript.post |cut -d= -f2`
|
||||
XCATSERVER="$SIP:3001"
|
||||
export XCATSERVER
|
||||
USEOPENSSLFORXCAT=1 #Though this is the only method going forward, flag to allow backward compatibility with 2.2 generated netboot images
|
||||
@ -28,12 +28,17 @@ if [ -x /usr/bin/openssl ]; then
|
||||
fi
|
||||
|
||||
|
||||
DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /tmp/mypostscript.post`
|
||||
echo "$DHCP_TMP" > /tmp/mypostscript.post
|
||||
DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /var/tmp/mypostscript.post`
|
||||
echo "$DHCP_TMP" > /var/tmp/mypostscript.post
|
||||
|
||||
echo "updateflag.awk \$MASTER 3002 \"installstatus booted\"" >> /tmp/mypostscript.post
|
||||
echo "updateflag.awk \$MASTER 3002 \"installstatus booted\"" >> /var/tmp/mypostscript.post
|
||||
|
||||
chmod +x /tmp/mypostscript.post
|
||||
if [ -x /tmp/mypostscript.post ];then
|
||||
/tmp/mypostscript.post
|
||||
chmod +x /var/tmp/mypostscript.post
|
||||
if [ -x /var/tmp/mypostscript.post ];then
|
||||
/var/tmp/mypostscript.post
|
||||
fi
|
||||
|
||||
chmod +x /var/tmp/mypostscript.post
|
||||
if [ -x /var/tmp/mypostscript.post ];then
|
||||
/var/tmp/mypostscript.post
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user