diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index c6e0c42ca..13c45fc78 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -89,7 +89,7 @@ do mkdir -p /opt/xcat touch /opt/xcat/xcatinfo fi - grep 'XCATSERVER' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'XCATSERVER' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/XCATSERVER=.*/XCATSERVER=$i/" /opt/xcat/xcatinfo else diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 0c26973b1..7303b00df 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -48,14 +48,14 @@ if [ ! -f /opt/xcat/xcatinfo ]; then touch /opt/xcat/xcatinfo fi -grep 'XCATSERVER' /opt/xcat/xcatinfo 2>&1 > /dev/null +grep 'XCATSERVER' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/XCATSERVER=.*/XCATSERVER=$MASTER_IP/" /opt/xcat/xcatinfo else echo "XCATSERVER=$MASTER_IP" >> /opt/xcat/xcatinfo fi -grep 'INSTALLDIR' /opt/xcat/xcatinfo 2>&1 > /dev/null +grep 'INSTALLDIR' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/INSTALLDIR=.*/INSTALLDIR=$INSTALLDIR/" /opt/xcat/xcatinfo else diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 28489c947..dfebd6565 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -322,7 +322,7 @@ if [ "$MODE" = "4" ]; then # for statelite mode if [ "$KEY" = "XCAT" ]; then TMP=`echo $i | awk -F= '{print $2}'` XCATSERVER=`echo $TMP | cut -d: -f1` - grep 'XCATSERVER' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'XCATSERVER' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/XCATSERVER=.*/XCATSERVER=$XCATSERVER/" /opt/xcat/xcatinfo else @@ -365,7 +365,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) break fi done - grep 'NODE' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'NODE' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/NODE=.*/NODE=$NODE/" /opt/xcat/xcatinfo else @@ -639,7 +639,7 @@ if [ -n "$new_ms" ]; then mkdir -p /opt/xcat touch /opt/xcat/xcatinfo fi - grep 'XCATSERVER' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'XCATSERVER' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/XCATSERVER=.*/XCATSERVER=$new_ms/" /opt/xcat/xcatinfo else @@ -663,7 +663,7 @@ if [ -n "$useflowcontrol" ]; then else new_fc="NO" fi - grep 'USEFLOWCONTROL' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'USEFLOWCONTROL' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/USEFLOWCONTROL=.*/USEFLOWCONTROL=$new_fc/" /opt/xcat/xcatinfo else @@ -687,7 +687,7 @@ if [ "$MODE" = "1" ] || [ "$MODE" = "2" ]; then mkdir -p /opt/xcat touch /opt/xcat/xcatinfo fi - grep 'NODE' /opt/xcat/xcatinfo 2>&1 > /dev/null + grep 'NODE' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/NODE=.*/NODE=$NODE/" /opt/xcat/xcatinfo else diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index 48d495042..72ce250d5 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -75,7 +75,7 @@ DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /xcatpost/mypostscript.post echo "$DHCP_TMP" > /xcatpost/mypostscript.post #mark that the first reboot after installation is finished -grep 'REBOOT' /opt/xcat/xcatinfo 2>&1 > /dev/null +grep 'REBOOT' /opt/xcat/xcatinfo > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -i "s/REBOOT=.*/REBOOT=TRUE/" /opt/xcat/xcatinfo else