diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index 34e56bf2f..78d15b5f4 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -38,7 +38,7 @@ config_Rsyslog_C3() cp -f $2 $2.XCATORIG fi - grep "xCAT settings" $conf_file + grep "xCAT settings" $conf_file 2>&1 1> /dev/null if [ $? -gt 0 ]; then echo "# xCAT settings" >> $2 #enable to receive remote logging @@ -100,7 +100,7 @@ if [ $isLinux -eq 1 ] && [ -a $sysconfig ]; then #check if it is ryslog version 3, it has totally different settings in /etc/syslog.cong if [ $isRsyslog -eq 1 ]; then - grep "SYSLOGD_OPTIONS" $sysconfig | grep -e "[\-c 3|\-c3]" + grep "SYSLOGD_OPTIONS" $sysconfig | grep -e "[\-c 3|\-c3]" 2>&1 1> /dev/null if [ $? -eq 0 ]; then isC3=1 fi @@ -172,7 +172,7 @@ else cp -f $conf_file $conf_file.XCATORIG fi - grep "xCAT settings" $conf_file + grep "xCAT settings" $conf_file 2>&1 1> /dev/null if [ $? -gt 0 ]; then if [ $isLinux -eq 0 ]; then # aix echo "# xCAT settings" >> $conf_file @@ -186,7 +186,7 @@ else if [ ! -f $conf_file.XCATORIG ]; then cp -f $conf_file $conf_file.XCATORIG fi - grep "xCAT settings" $conf_file + grep "xCAT settings" $conf_file 2>&1 1> /dev/null if [ $? -gt 0 ]; then echo "# xCAT settings" >> $conf_file echo "destination loghost { udp(\"$master\"); };" >> $conf_file diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index f09b89a9e..b443d4da9 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -23,9 +23,9 @@ if [ -e '/etc/SuSE-release' ]; then OSVER=`grep -h VERSION /etc/SuSE-release |awk '{print $3}'` fi -SIP=`grep -h dhcp-server-identifier /var/lib/dhclient/dhclient*.leases|tail -n 1|awk '{print $3}'|sed -e 's/;//'` +SIP=`grep -h dhcp-server-identifier /var/lib/dhclient/dhclient*.leases 2> /dev/null|tail -n 1|awk '{print $3}'|sed -e 's/;//'` if [ -z "$SIP" ]; then - SIP=`grep -h DHCPSID /var/lib/dhcpcd/*.info|awk -F= '{print $2}'|tail -n 1` + SIP=`grep -h DHCPSID /var/lib/dhcpcd/*.info 2> /dev/null|awk -F= '{print $2}'|tail -n 1` fi #echo "SIP=$SIP"