From 7d877d5dd7ccec2a959cfff0571150b3ec15874d Mon Sep 17 00:00:00 2001 From: otubo Date: Mon, 15 Aug 2011 15:55:42 +0000 Subject: [PATCH] Fix for bug #3392028 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10288 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/install/scripts/post.debian | 24 ++++++------ .../share/xcat/install/scripts/post.esx | 2 +- .../share/xcat/install/scripts/post.rh | 24 ++++++------ .../share/xcat/install/scripts/post.rh.iscsi | 24 ++++++------ .../xcat/install/scripts/post.rhel5.s390x | 26 ++++++------- .../xcat/install/scripts/post.rhel6.s390x | 26 ++++++------- .../share/xcat/install/scripts/post.sles | 22 +++++------ .../xcat/install/scripts/post.sles.iscsi | 26 ++++++------- .../xcat/install/scripts/post.sles10.s390x | 38 +++++++++---------- .../share/xcat/install/scripts/post.sles11 | 26 ++++++------- .../xcat/install/scripts/post.sles11.iscsi | 22 +++++------ .../xcat/install/scripts/post.sles11.s390x | 34 ++++++++--------- 12 files changed, 147 insertions(+), 147 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index 2bb38be0d..016ebb6ef 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -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 @@ -98,9 +98,9 @@ cd /xcatpost 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 +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# diff --git a/xCAT-server/share/xcat/install/scripts/post.esx b/xCAT-server/share/xcat/install/scripts/post.esx index 7f5f639f2..f79ebedfb 100644 --- a/xCAT-server/share/xcat/install/scripts/post.esx +++ b/xCAT-server/share/xcat/install/scripts/post.esx @@ -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 mkdir -p /xcatpost service portmap start ifconfig diff --git a/xCAT-server/share/xcat/install/scripts/post.rh b/xCAT-server/share/xcat/install/scripts/post.rh index fbf8a2214..f613918d1 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh +++ b/xCAT-server/share/xcat/install/scripts/post.rh @@ -39,7 +39,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) @@ -61,8 +61,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 @@ -74,12 +74,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 @@ -104,9 +104,9 @@ cd /xcatpost 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 +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' @@ -126,10 +126,10 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #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# diff --git a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi index 3215ff570..fa1b6f673 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi +++ b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi @@ -43,7 +43,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) @@ -65,8 +65,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 @@ -78,10 +78,10 @@ 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 @@ -106,9 +106,9 @@ cd /xcatpost 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 +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' @@ -128,10 +128,10 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #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# diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x index 2d42d1b36..5ead690b4 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x @@ -8,7 +8,7 @@ hostname $HOSTNAME # Master/service node set by nodeset export MASTER_IPS=( replace_master ) export MASTER=replace_master -cd /tmp +cd /var/tmp RAND=$(perl -e 'print int(rand(50)). "\n"') sleep $RAND @@ -41,8 +41,8 @@ do chmod +x /xcatpost/* # Get postscript to run on this node from xcat server - /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 @@ -57,12 +57,12 @@ do sleep $SLI # Get postscript to run on this node from xcat server - /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 # Make executable - chmod +x /tmp/mypostscript + chmod +x /var/tmp/mypostscript GOTIT=1 break fi @@ -86,9 +86,9 @@ cd /xcatpost export PATH=/xcatpost:$PATH # Save post boot 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 +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 post init cat >/etc/init.d/xcatpostinit1 << 'EOF' @@ -110,9 +110,9 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 # Only run preboot scripts here -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript` -echo "$TMP" > /tmp/mypostscript -/tmp/mypostscript +TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /var/tmp/mypostscript` +echo "$TMP" > /var/tmp/mypostscript +/var/tmp/mypostscript # Master/service node variable set by nodeset -updateflag.awk replace_master 3002 \ No newline at end of file +updateflag.awk replace_master 3002 diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x index d739ecb9d..d94ef40dd 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x @@ -8,7 +8,7 @@ hostname $HOSTNAME # Master/service node set by nodeset export MASTER_IPS=( replace_master ) export MASTER=replace_master -cd /tmp +cd /var/tmp RAND=$(perl -e 'print int(rand(50)). "\n"') sleep $RAND @@ -41,8 +41,8 @@ do chmod +x /xcatpost/* # Get postscript to run on this node from xcat server - /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 @@ -57,12 +57,12 @@ do sleep $SLI # Get postscript to run on this node from xcat server - /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 # Make executable - chmod +x /tmp/mypostscript + chmod +x /var/tmp/mypostscript GOTIT=1 break fi @@ -86,9 +86,9 @@ cd /xcatpost export PATH=/xcatpost:$PATH # Save post boot 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 +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 post init cat >/etc/init.d/xcatpostinit1 << 'EOF' @@ -110,12 +110,12 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 # Only run preboot scripts here -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript` -echo "$TMP" > /tmp/mypostscript -/tmp/mypostscript +TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /var/tmp/mypostscript` +echo "$TMP" > /var/tmp/mypostscript +/var/tmp/mypostscript # Master/service node variable set by nodeset updateflag.awk replace_master 3002 # Restore default SELinux security context -restorecon -R -v /root/.ssh \ No newline at end of file +restorecon -R -v /root/.ssh diff --git a/xCAT-server/share/xcat/install/scripts/post.sles b/xCAT-server/share/xcat/install/scripts/post.sles index 9dd3a4ceb..98365cea8 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles +++ b/xCAT-server/share/xcat/install/scripts/post.sles @@ -95,8 +95,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 @@ -108,10 +108,10 @@ 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 @@ -133,9 +133,9 @@ PATH=/xcatpost:$PATH export 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 +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' @@ -155,9 +155,9 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #only run the prebooot scripts here -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript` -echo "$TMP" > /tmp/mypostscript -/tmp/mypostscript +TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /var/tmp/mypostscript` +echo "$TMP" > /var/tmp/mypostscript +/var/tmp/mypostscript updateflag.awk $MASTER 3002 cd / /xcatpost/#TABLE:nodelist:$NODE:node# diff --git a/xCAT-server/share/xcat/install/scripts/post.sles.iscsi b/xCAT-server/share/xcat/install/scripts/post.sles.iscsi index 345e57774..d07e3c890 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles.iscsi +++ b/xCAT-server/share/xcat/install/scripts/post.sles.iscsi @@ -51,8 +51,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 @@ -64,10 +64,10 @@ 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 @@ -88,10 +88,10 @@ done PATH=/xcatpost:$PATH export 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' @@ -111,14 +111,14 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #only run the prebooot scripts here -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript` -echo "$TMP" > /tmp/mypostscript -/tmp/mypostscript +TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /var/tmp/mypostscript` +echo "$TMP" > /var/tmp/mypostscript +/var/tmp/mypostscript updateflag.awk $MASTER 3002 cd / /xcatpost/#TABLE:nodelist:$NODE:node# #rm -Rf /xcatpost -#rm -f /tmp/mypostscript +#rm -f /var/tmp/mypostscript #rmdir /xcatpost ]]> diff --git a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x index f87c17be0..64016ace9 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x @@ -7,15 +7,15 @@ #!/bin/sh # Set MAC address -cat /etc/sysconfig/network/ifcfg-replace_device | grep -v "LLADDR" | grep -v "UNIQUE" > /tmp/ifcfg-replace_device -echo "LLADDR='replace_lladdr'" >> /tmp/ifcfg-replace_device -echo "UNIQUE=''" >> /tmp/ifcfg-replace_device -cat /tmp/ifcfg-replace_device > /etc/sysconfig/network/ifcfg-replace_device +cat /etc/sysconfig/network/ifcfg-replace_device | grep -v "LLADDR" | grep -v "UNIQUE" > /var/tmp/ifcfg-replace_device +echo "LLADDR='replace_lladdr'" >> /var/tmp/ifcfg-replace_device +echo "UNIQUE=''" >> /var/tmp/ifcfg-replace_device +cat /var/tmp/ifcfg-replace_device > /etc/sysconfig/network/ifcfg-replace_device # Set layer = 2 -cat /etc/sysconfig/hardware/hwcfg-replace_device | grep -v "QETH_LAYER2_SUPPORT" > /tmp/hwcfg-replace_device -echo "QETH_LAYER2_SUPPORT='1'" >> /tmp/hwcfg-replace_device -cat /tmp/hwcfg-replace_device > /etc/sysconfig/hardware/hwcfg-replace_device +cat /etc/sysconfig/hardware/hwcfg-replace_device | grep -v "QETH_LAYER2_SUPPORT" > /var/tmp/hwcfg-replace_device +echo "QETH_LAYER2_SUPPORT='1'" >> /var/tmp/hwcfg-replace_device +cat /var/tmp/hwcfg-replace_device > /etc/sysconfig/hardware/hwcfg-replace_device # Get node hostname HOSTNAME=$(hostname -s) @@ -52,8 +52,8 @@ do chmod +x /xcatpost/* # Get postscript to run on this node from xcat server - /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 @@ -67,12 +67,12 @@ do sleep $SLI # Get postscript to run on this node from xcat server - /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 # Make executable - chmod +x /tmp/mypostscript + chmod +x /var/tmp/mypostscript GOTIT=1 break fi @@ -99,9 +99,9 @@ PATH=/xcatpost:$PATH export PATH # Save post boot 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 +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 post init cat >/etc/init.d/xcatpostinit1 << 'EOF' @@ -127,11 +127,11 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 # Only run 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 # Run postscripts -/tmp/mypostscript +/var/tmp/mypostscript # Master node is set by nodeset updateflag.awk replace_master 3002 @@ -139,4 +139,4 @@ cd / ]]> - \ No newline at end of file + diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11 b/xCAT-server/share/xcat/install/scripts/post.sles11 index bb13e4bb9..0cc89c9dc 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11 +++ b/xCAT-server/share/xcat/install/scripts/post.sles11 @@ -16,8 +16,8 @@ BOOTPROTO=dhcp STARTMODE=onboot EOF -. /tmp/prinicsetting -rm /tmp/prinicsetting +. /var/tmp/prinicsetting +rm /var/tmp/prinicsetting if [ "$PRINIC" != "eth0" ] then cd /etc/sysconfig/network @@ -78,8 +78,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 @@ -91,10 +91,10 @@ 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 @@ -116,9 +116,9 @@ PATH=/xcatpost:$PATH export 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 +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' @@ -138,10 +138,10 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #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 updateflag.awk $MASTER 3002 cd / diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11.iscsi b/xCAT-server/share/xcat/install/scripts/post.sles11.iscsi index 473c37bcc..bc8e716f6 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11.iscsi +++ b/xCAT-server/share/xcat/install/scripts/post.sles11.iscsi @@ -57,8 +57,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 @@ -70,10 +70,10 @@ 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 @@ -95,9 +95,9 @@ PATH=/xcatpost:$PATH export 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 +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' @@ -117,10 +117,10 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 #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 updateflag.awk $MASTER 3002 cd / /xcatpost/#TABLE:nodelist:$NODE:node# diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x index fd5263f87..1bc6f5102 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x @@ -7,11 +7,11 @@ #!/bin/sh # Set MAC address -cat /etc/sysconfig/network/ifcfg-replace_device | grep -v "LLADDR" | grep -v "UNIQUE" > /tmp/ifcfg-replace_device -echo "LLADDR='replace_lladdr'" >> /tmp/ifcfg-replace_device -echo "UNIQUE=''" >> /tmp/ifcfg-replace_device -echo "NAME='OSA Express Network card (replace_nic_addr)'" >> /tmp/ifcfg-replace_device -cat /tmp/ifcfg-replace_device > /etc/sysconfig/network/ifcfg-replace_device +cat /etc/sysconfig/network/ifcfg-replace_device | grep -v "LLADDR" | grep -v "UNIQUE" > /var/tmp/ifcfg-replace_device +echo "LLADDR='replace_lladdr'" >> /var/tmp/ifcfg-replace_device +echo "UNIQUE=''" >> /var/tmp/ifcfg-replace_device +echo "NAME='OSA Express Network card (replace_nic_addr)'" >> /var/tmp/ifcfg-replace_device +cat /var/tmp/ifcfg-replace_device > /etc/sysconfig/network/ifcfg-replace_device # Get node hostname HOSTNAME=$(hostname -s) @@ -48,8 +48,8 @@ do chmod +x /xcatpost/* # Get postscript to run on this node from xcat server - /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 @@ -63,12 +63,12 @@ do sleep $SLI # Get postscript to run on this node from xcat server - /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 # Make executable - chmod +x /tmp/mypostscript + chmod +x /var/tmp/mypostscript GOTIT=1 break fi @@ -95,9 +95,9 @@ PATH=/xcatpost:$PATH export PATH # Save post boot 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 +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 post init cat >/etc/init.d/xcatpostinit1 << 'EOF' @@ -123,11 +123,11 @@ chmod 755 /opt/xcat/xcatinstallpost chkconfig --add xcatpostinit1 # Only run 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 # Run postscripts -/tmp/mypostscript +/var/tmp/mypostscript # Master node is set by nodeset updateflag.awk replace_master 3002 @@ -135,4 +135,4 @@ cd / ]]> - \ No newline at end of file +