correct exclure trc00 for standard debian /etc/hosts
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 6 Nov 2015 16:25:36 +0000 (17:25 +0100)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 6 Nov 2015 16:25:36 +0000 (17:25 +0100)
master/opt/script/check_network

index 5c17bf2d8ee0abc7f20a4c4b80b5536755e19a5f..edd2069b7a53cdea3617efd5f52ad00ab3ea9c27 100755 (executable)
@@ -48,7 +48,7 @@ while [ $# -gt 0 ]; do
     -t) shift; [[ "$1" =~ [^0-9] ]] && { echo "incorrect timeout ($1)"; exit 1;}; TIMEOUT=$1;;
     -v) echo "$PROGNAME: version $VER"; exit;;
     -w) MODE="wait";;
-    -x) EXCLUDE="trc00";;
+    -x) EXCLUDE="trc00[^ ]*";;
     *) list+=" "$1;;
     esac
     shift
@@ -56,7 +56,7 @@ done
 
 # list
 [ "$list" ] || list=$(awk '{sub(/#.*/, "")} /trc[0-9][0-9]/ && ! /-rf/ {print $2}' /etc/hosts)
-list=$(echo $list" "|sed s/$EXCLUDE//)
+list=$(echo $list" "|sed "s/$EXCLUDE//")
 
 # timeout
 if [ "$TIMEOUT" ]; then