From 76b477c39871842a6950c38a69bca9f14cf6f9bb Mon Sep 17 00:00:00 2001 From: Samveen Gulati Date: Tue, 14 Nov 2017 08:38:24 +0000 Subject: [PATCH] Error redirection for checks --- xCAT-server/share/xcat/scripts/xHRM | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/scripts/xHRM b/xCAT-server/share/xcat/scripts/xHRM index 3571d44bb..64d015911 100755 --- a/xCAT-server/share/xcat/scripts/xHRM +++ b/xCAT-server/share/xcat/scripts/xHRM @@ -24,7 +24,7 @@ function get_def_interface { echo "ERROR: Unable to reasonably guess the default interface" >&2 exit 1 fi - if brctl show | grep ^$iface >& /dev/null; then # + if brctl show | grep ^$iface &> /dev/null; then # OIFS=$IFS IFS=$'\n' INMATCH=0 @@ -155,13 +155,13 @@ elif [ "bridgeprereq" = "$1" ]; then fi # To check whether the brctl have been installed - if ! which brctl > /dev/null; then + if ! which brctl &> /dev/null; then echo "No bridge-utils installed, pls install it first" exit 1 fi - if brctl showstp "$BNAME" > /dev/null; then - echo "$BNAME" + if brctl showstp "$BNAME" &> /dev/null; then + echo "$BNAME already exists" exit 0 fi