summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaka Kranjc2007-06-03 12:14:43 +0200
committerEric Sandall2007-06-03 10:35:53 -0700
commit1258d1c5a3d8783c8d900aa1b20a184988246161 (patch)
treea75a1a601a62362f7078120d9762ee683a6de665
parentcde6e7640817dd4f28f8d17dcc7c5d9701995c28 (diff)
init.d: remove last bad grep #10439
(cherry picked from commit b71ade7e65848e8bec3dc4502ddedf772748ea4d)
-rw-r--r--smgl/init.d/HISTORY3
-rw-r--r--smgl/init.d/files/smgl_functions2
2 files changed, 4 insertions, 1 deletions
diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY
index efcd3aebc5..bf58df6954 100644
--- a/smgl/init.d/HISTORY
+++ b/smgl/init.d/HISTORY
@@ -1,3 +1,6 @@
+2007-06-02 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
+ * files/smgl_functions: remove grep usage #10439
+
2007-05-23 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
* BUILD, FINAL: added temporary file workaround for #13363
diff --git a/smgl/init.d/files/smgl_functions b/smgl/init.d/files/smgl_functions
index 2d420836c6..01352fbd69 100644
--- a/smgl/init.d/files/smgl_functions
+++ b/smgl/init.d/files/smgl_functions
@@ -138,7 +138,7 @@ export -f print_status
getpids()
{
local base=${1##*/}
- pidlist=$(builtin echo $(for i in $(pidof -o $$ -o $PPID -o '%PPID' -x $base); do grep -vq '/etc/init[.]d' /proc/$i/cmdline && builtin echo $i; done))
+ pidlist=$(builtin echo $(for i in $(pidof -o $$ -o $PPID -o '%PPID' -x $base); do awk -v i=$i '!/\/etc\/init[.]d/ {print i}' < /proc/$i/cmdline; done))
}
loadproc()