aports/main/util-vserver/bb-grep.patch
2011-04-13 14:08:38 +00:00

21 lines
772 B
Diff

--- ./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