blob: 9a592c09cbe443c764b69a0eaf3948e770ed5a9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 571d1a134665c80d01a2a3cc2db576662b68243d Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Sun, 5 Aug 2012 01:41:16 +0100
Subject: [PATCH] scripts/zaurusd: use pidof instead of mangling output of ps
busybox provides working pidof if sysvinit doesn't, so use that.
Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/zaurusd.in | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/scripts/zaurusd.in b/scripts/zaurusd.in
index ad896aa..acb5158 100755
--- a/scripts/zaurusd.in
+++ b/scripts/zaurusd.in
@@ -1,10 +1,7 @@
#!/bin/sh
killproc() { # kill the named process(es)
- pid=`/bin/ps -e x |
- /bin/grep $1 |
- /bin/grep -v grep |
- /bin/sed -e 's/^ *//' -e 's/ .*//'`
+ pid=`/bin/pidof $1`
[ "$pid" != "" ] && kill $pid
}
|