aboutsummaryrefslogtreecommitdiffstats
path: root/main/util-vserver/bb-grep.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/util-vserver/bb-grep.patch')
-rw-r--r--main/util-vserver/bb-grep.patch25
1 files changed, 17 insertions, 8 deletions
diff --git a/main/util-vserver/bb-grep.patch b/main/util-vserver/bb-grep.patch
index e4e2101d31..ce6c5f0459 100644
--- a/main/util-vserver/bb-grep.patch
+++ b/main/util-vserver/bb-grep.patch
@@ -1,11 +1,20 @@
--- ./scripts/functions.orig
+++ ./scripts/functions
-@@ -542,7 +542,7 @@
- (STOPPED) ! $_VSERVER "$_ga_i" running &>/dev/null || _ga_doadd=;;
- (RUNNING) $_VSERVER "$_ga_i" running &>/dev/null || _ga_doadd=;;
- (ALL) ;;
-- (MARK) test -s "$_ga_markfile" && grep -qx "$3" "$_ga_markfile" || _ga_doadd=;;
-+ (MARK) test -s "$_ga_markfile" && grep -q "^$3$" "$_ga_markfile" || _ga_doadd=;;
- (*) panic $"Unknown vserver tagging '$2'";;
- esac
+@@ -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