aboutsummaryrefslogtreecommitdiffstats
path: root/main/util-vserver/bb-grep.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-13 14:08:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-13 14:08:38 +0000
commite62adb77980b8fe5ccb5005736c3c0e7dde9a0a9 (patch)
tree8e5336250b4374043fd719f4a4b32574116eeb14 /main/util-vserver/bb-grep.patch
parent4b0bba8080a7fc881f29b41be68457c4c546c24f (diff)
downloadaports-e62adb77980b8fe5ccb5005736c3c0e7dde9a0a9.tar.bz2
aports-e62adb77980b8fe5ccb5005736c3c0e7dde9a0a9.tar.xz
main/util-vserver: add proper patch
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