diff --git a/xCAT-server/share/xcat/install/fedora/service.fedora9.tmpl b/xCAT-server/share/xcat/install/fedora/service.fedora9.tmpl index 674705ba8..3593fd919 100644 --- a/xCAT-server/share/xcat/install/fedora/service.fedora9.tmpl +++ b/xCAT-server/share/xcat/install/fedora/service.fedora9.tmpl @@ -146,7 +146,7 @@ reboot #end of section # %packages -@ Everything +#@ Everything @ Network Servers @ System Tools @ X Window System diff --git a/xCAT-server/share/xcat/install/scripts/post.rh b/xCAT-server/share/xcat/install/scripts/post.rh index 918787e9d..70152a7f3 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh +++ b/xCAT-server/share/xcat/install/scripts/post.rh @@ -21,67 +21,59 @@ done >>/etc/resolv.conf export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | awk -F. '{print $1}') hostname $HOSTNAME # -# Run xCAT post install +# put xCAT post install in init.d process # -export MASTER_IP="#XCATVAR:XCATMASTER#" -export MASTER_IPS="#XCATVAR:XCATMASTER#" -export MASTER="#XCATVAR:XCATMASTER#" -cd /tmp -RAND=$(perl -e 'print int(rand(50)). "\n"') -sleep $RAND -for i in $(seq 1 20) -do - GOTIT=0 - for i in $MASTER_IPS - do - wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts - #wget --wait=10 --random-wait --waitretry=10 --retry-connrefused -t 0 -T 60 http://$i/install/autoinst/xcatpost.tar.gz - if [ "$?" = "0" ] - then - if [ ! -x /usr/bin/openssl ]; then #Stop if no openssl to help the next bit - exit 1 - fi - XCATSERVER=$i:3001 - export XCATSERVER - 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=`cat /tmp/mypostscript` - while [ -z "$MYCONT" ]; do - let SLI=$RANDOM%10+10 - sleep $SLI - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript - MYCONT=`cat /tmp/mypostscript` - done +cat >/etc/init.d/xcatpostinit << EOF +#INCLUDE_NOP:#TABLE:site:key=installdir:value#/postscripts/xcatpostinit# +EOF +chmod 755 /etc/init.d/xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc3.d/S84xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc4.d/S84xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc5.d/S84xcatpostinit - - chmod +x /tmp/mypostscript - GOTIT=1 - break - fi - done - if [ "$GOTIT" = "1" ] - then - break - fi - RAND=$(perl -e 'print int(rand(5)). "\n"') - sleep $RAND -done -cd /xcatpost -#gunzip xcatpost.tar.gz -#tar -xvf xcatpost.tar -#/xcatpost/#TABLE:nodelist:THISNODE:node# -export PATH=/xcatpost:$PATH -/tmp/mypostscript -export NODE=#TABLE:nodelist:THISNODE:node# -export OSVER=#TABLE:nodetype:THISNODE:os# -export ARCH=#TABLE:nodetype:THISNODE:arch# -addsiteyum +mkdir -p /opt/xcat +cat >/opt/xcat/xcatdsklspost << EOF +#INCLUDE_NOP:#TABLE:site:key=installdir:value#/postscripts/xcatdsklspost# +chkconfig xcatpostinit off +EOF +TMP=`sed "/IBM(c)/ a ADDSITEYUM=1" /opt/xcat/xcatdsklspost` +echo "$TMP" > /opt/xcat/xcatdsklspost +chmod 755 /opt/xcat/xcatdsklspost +chkconfig --add xcatpostinit + +#something Jarrod knows sed -i 's/^serial/#serial/' /boot/grub/menu.lst sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst -updateflag.awk $MASTER 3002 -cd / -rm -Rf /xcatpost -rm -f /tmp/mypostscript + +#change the chain from install to boot +cat >/tmp/updateflag.awk < 0) + print \$0 + + if(\$0 == "ready") + print "next" |& ns + if(\$0 == "done") + break + } + + close(ns) + + exit 0 +} +EOF +chmod 755 /tmp/updateflag.awk +/tmp/updateflag.awk + +#remove all the repos, later addsiteyum will add the one from the master node. +rm -f /etc/yum.repos.d/* + exit 0 diff --git a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi index 1f3141cd1..c61bde74e 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi +++ b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi @@ -19,68 +19,69 @@ do echo "nameserver $i" done >>/etc/resolv.conf export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | awk -F. '{print $1}') -hostname $HOSTNAME -# -# Run xCAT post install +hostname $HOSTNAME# +# put xCAT post install in init.d process # +cat >/etc/init.d/xcatpostinit << EOF +#INCLUDE_NOP:#TABLE:site:key=installdir:value#/postscripts/xcatpostinit# +EOF +chmod 755 /etc/init.d/xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc3.d/S84xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc4.d/S84xcatpostinit +ln -s /etc/init.d/xcatpostinit /etc/init.d/rc5.d/S84xcatpostinit + +mkdir -p /opt/xcat +cat >/opt/xcat/xcatdsklspost << EOF +#INCLUDE_NOP:#TABLE:site:key=installdir:value#/postscripts/xcatdsklspost# +chkconfig xcatpostinit off +EOF +TMP=`sed "/IBM(c)/ a ADDSITEYUM=1" /opt/xcat/xcatdsklspost` +echo "$TMP" > /opt/xcat/xcatdsklspost +chmod 755 /opt/xcat/xcatdsklspost +chkconfig --add xcatpostinit + export MASTER_IP="#XCATVAR:XCATMASTER#" export MASTER_IPS="#XCATVAR:XCATMASTER#" export MASTER="#XCATVAR:XCATMASTER#" -cd /tmp +mkdir -p /tmp/xcatpost +cd /tmp/xcatpost RAND=$(perl -e 'print int(rand(50)). "\n"') sleep $RAND for i in $(seq 1 20) do - GOTIT=0 - for i in $MASTER_IPS - do - wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts - #wget --wait=10 --random-wait --waitretry=10 --retry-connrefused -t 0 -T 60 http://$i/install/autoinst/xcatpost.tar.gz - if [ "$?" = "0" ] - then - if [ ! -x /usr/bin/openssl ]; then #Stop if no openssl to help the next bit - exit 1; - fi - XCATSERVER=$i:3001 - export XCATSERVER - 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=`cat /tmp/mypostscript` - while [ -z "$MYCONT" ]; do - let SLI=$RANDOM%10+10 - sleep $SLI - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript - MYCONT=`cat /tmp/mypostscript` - done - chmod +x /tmp/mypostscript - GOTIT=1 - break - fi - done - if [ "$GOTIT" = "1" ] + GOTIT=0 + for i in $MASTER_IPS + do + wget -l inf -N --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts/uploadboot + wget -l inf -N --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts/locktftpdir.awk + wget -l inf -N --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts/unlocktftpdir.awk + wget -l inf -N --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$i/postscripts/setiscsiparms.awk + if [ "$?" = "0" ] then - break + if [ ! -x /usr/bin/openssl ]; then #Stop if no openssl to help the next bit + exit 1; + fi + chmod +x /tmp/xcatpost/* + GOTIT=1 + break fi - RAND=$(perl -e 'print int(rand(5)). "\n"') - sleep $RAND + done + if [ "$GOTIT" = "1" ] + then + break + fi + RAND=$(perl -e 'print int(rand(5)). "\n"') + sleep $RAND done -cd /xcatpost -#gunzip xcatpost.tar.gz -#tar -xvf xcatpost.tar -#/xcatpost/#TABLE:nodelist:THISNODE:node# -export PATH=/xcatpost:$PATH -/tmp/mypostscript export NODE=#TABLE:nodelist:THISNODE:node# export OSVER=#TABLE:nodetype:THISNODE:os# export ARCH=#TABLE:nodetype:THISNODE:arch# -addsiteyum iscsiadm -m discovery -t st -p #TABLE:iscsi:$NODE:server# sed -i 's/^serial/#serial/' /boot/grub/menu.lst sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst + +#remove all the repos, later addsiteyum will add the one from the master node. +rm -f /etc/yum.repos.d/* + uploadboot -cd / -rm -Rf /xcatpost -rm -f /tmp/mypostscript exit 0 diff --git a/xCAT-server/share/xcat/netboot/sles/service.sles10.ppc64.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sles10.ppc64.otherpkgs.pkglist new file mode 100644 index 000000000..8efceda47 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sles10.ppc64.otherpkgs.pkglist @@ -0,0 +1,2 @@ +xcat/core-snap/xCATsn +xcat/xcat-dep/sles10/ppc64/yaboot-xcat diff --git a/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.otherpkgs.pkglist new file mode 100644 index 000000000..1f1c4c7a9 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.otherpkgs.pkglist @@ -0,0 +1,2 @@ +xcat/core-snap/xCATsn +xcat/xcat-dep/sles11/ppc64/yaboot-xcat