From 8c663f946b0b6df444d2010a93f33c6021ace69a Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Thu, 17 Aug 2017 10:49:27 +0800 Subject: [PATCH] Filter non-content lines when generating mypostscripts --- xCAT-server/share/xcat/install/scripts/post.debian | 4 ++-- xCAT-server/share/xcat/install/scripts/post.rhel5.s390x | 4 ++-- xCAT-server/share/xcat/install/scripts/post.rhel6.s390x | 4 ++-- xCAT-server/share/xcat/install/scripts/post.sles10.s390x | 4 ++-- xCAT-server/share/xcat/install/scripts/post.sles11.s390x | 4 ++-- xCAT-server/share/xcat/install/scripts/post.xcat | 4 ++-- xCAT/postscripts/xcatdsklspost | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index f11296a24..3f8aa5aa0 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -59,7 +59,7 @@ do mv $i/postscripts /xcatpost rm -rf $i chmod +x /xcatpost/* - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep '' |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` MAX_RETRIES=10 RETRY=0 @@ -72,7 +72,7 @@ do let SLI=$RANDOM%10+10 sleep $SLI - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` done diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x index 63de0a3a2..63bfc4e1a 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x @@ -47,7 +47,7 @@ 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/^ *//' > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` MAX_RETRIES=10 RETRY=0 @@ -63,7 +63,7 @@ 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/^ *//' > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` done diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x index 5bfd78b99..72e441781 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x @@ -47,7 +47,7 @@ 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/^ *//' > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` MAX_RETRIES=10 RETRY=0 @@ -63,7 +63,7 @@ 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/^ *//' > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript MYCONT=`grep MASTER /xcatpost/mypostscript` done diff --git a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x index 9770af8b8..f6d0947a3 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x @@ -52,7 +52,7 @@ 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 + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript MYCONT=`grep MASTER /tmp/mypostscript` MAX_RETRIES=10 RETRY=0 @@ -67,7 +67,7 @@ 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 + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript MYCONT=`grep MASTER /tmp/mypostscript` done diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x index d3f244404..e213ee557 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x @@ -53,7 +53,7 @@ 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 + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript MYCONT=`grep MASTER /tmp/mypostscript` MAX_RETRIES=10 RETRY=0 @@ -68,7 +68,7 @@ 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 + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript MYCONT=`grep MASTER /tmp/mypostscript` done diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index ba66f082b..388badb7b 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -138,7 +138,7 @@ if [ ! -x /xcatpost/mypostscript ]; then /tmp/updateflag $MASTER $XCATIPORT "installstatus failed" sleep 36500d fi - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript MYCONT=`grep ^MASTER= /xcatpost/mypostscript` RETRY=0 @@ -150,7 +150,7 @@ if [ ! -x /xcatpost/mypostscript ]; then let SLI=$RANDOM%10+10 sleep $SLI - /xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript + /xcatpost/getpostscript.awk |egrep ''|sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript MYCONT=`grep ^MASTER= /xcatpost/mypostscript` done diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 81df3d557..989b35548 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -637,7 +637,7 @@ if [ ! -x /$xcatpost/mypostscript ]; then useflowcontrol=0 fi fi - /$xcatpost/getpostscript.awk | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /$xcatpost/mypostscript; + /$xcatpost/getpostscript.awk | egrep '' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/<//g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /$xcatpost/mypostscript; MYCONT=`grep MASTER /$xcatpost/mypostscript` if [ ! -z "$MYCONT" ]; then break;