From: Karolin Seeger Date: Mon, 5 Jan 2009 15:38:25 +0000 (+0100) Subject: Revert "examples: Avoid bashism in perfcount.init." X-Git-Tag: samba-3.0.34~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf6c6d3560d1188bace4531f8cdbd34f486e4948;p=thirdparty%2Fsamba.git Revert "examples: Avoid bashism in perfcount.init." This reverts commit 744c7007b4b798699613e06933f92fdf5261b222. (cherry picked from commit 26080fd575df450166e13836ea227a6d191e86c4) --- diff --git a/examples/perfcounter/perfcountd.init b/examples/perfcounter/perfcountd.init index 7d151f6e8e5..bb4148e52f6 100755 --- a/examples/perfcounter/perfcountd.init +++ b/examples/perfcounter/perfcountd.init @@ -22,15 +22,15 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin -killproc() +killproc() { pid=`ps aux | grep $1 | egrep -v '(grep|perfcountd)' | awk '{print $2}'` - if [ -z "$pid" ]; then + if [ "$pid" != "" ]; then kill $pid fi } -# Start/stop processes +# Start/stop processes case "$1" in