summaryrefslogtreecommitdiffstats
path: root/main/util-vserver/bb-grep.patch
blob: ce6c5f045988f48791544de8c78465dcae16d0bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ./scripts/functions.orig
+++ ./scripts/functions
@@ -553,7 +553,7 @@
 			for _ga_j in "${_ga_marks[@]}"; do
 			    _ga_mark="$(echo "$_ga_j" | $_SED 's/^[!~]//')"
 			    test "$_ga_j" = "$_ga_mark" || _ga_invert=true
-			    test -s "$_ga_markfile" && $_GREP -qx "$_ga_mark" "$_ga_markfile" && \
+			    test -s "$_ga_markfile" && $_GREP -q "^$_ga_mark\$" "$_ga_markfile" && \
 				_ga_f=true || :
 			done
 			test $_ga_f = $_ga_invert && \
@@ -637,7 +637,7 @@
 	set -- $($_GREP '^Tasks:' "/proc/virtual/$1/status" 2>/dev/null)
 	_gp_procnr_cnt=$2
     else
-	_gp_procnr_cnt=$($_VPS ax | $_AWK '{print $2}' | $_GREP -x "$1" | $_WC -l )
+	_gp_procnr_cnt=$($_VPS ax | $_AWK '{print $2}' | $_GREP "^$1\$" | $_WC -l )
     fi
 
     let _gp_procnr_cnt=_gp_procnr_cnt+0