From: Karolin Seeger Date: Mon, 5 Jan 2009 13:54:28 +0000 (+0100) Subject: examples: Avoid bashism in perfcount.init. X-Git-Tag: samba-4.0.0alpha6~280^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73875cd344608b591fa884ab99b5f3a10550c149;p=thirdparty%2Fsamba.git examples: Avoid bashism in perfcount.init. This fixes bug #6000. Thanks to the Debian Samba package maintainers for providing the patch! Remove trailing whitespaces. Karolin --- diff --git a/examples/perfcounter/perfcountd.init b/examples/perfcounter/perfcountd.init index 683e91395b1..8a89fad2b51 100755 --- a/examples/perfcounter/perfcountd.init +++ b/examples/perfcounter/perfcountd.init @@ -21,15 +21,15 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin -killproc() +killproc() { pid=`ps aux | grep $1 | egrep -v '(grep|perfcountd)' | awk '{print $2}'` - if [ "$pid" != "" ]; then + if [ -z "$pid" ]; then kill $pid fi } -# Start/stop processes +# Start/stop processes case "$1" in