examples: Avoid bashism in perfcount.init.
authorKarolin Seeger <kseeger@samba.org>
Mon, 5 Jan 2009 15:33:00 +0000 (16:33 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Jan 2009 15:34:05 +0000 (16:34 +0100)
This fixes bug #6000.
Thanks to the Debian Samba package maintainers for providing the patch!
Remove trailing whitespaces.

Karolin

examples/perfcounter/perfcountd.init

index b82aea923097c7bfa5b05473c24c5dc2709f0fc6..0beff9622760be78a72b5df2cd717fdfc9c6eaed 100755 (executable)
@@ -24,14 +24,14 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 killproc()
 {
        pid=`ps aux | grep $1 | egrep -v '(grep|perfcountd)' | awk '{print $2}'`
 killproc()
 {
        pid=`ps aux | grep $1 | egrep -v '(grep|perfcountd)' | awk '{print $2}'`
-       if [ "$pid" != "" ]; then
+       if [ x"$pid" != "x" ]; then
                kill $pid
        fi
 }
 
 # Start/stop processes
 
                kill $pid
        fi
 }
 
 # Start/stop processes
 
-case "$1" 
+case "$1"
 in
 start)
        /opt/samba/bin/perfcount -d -f /var/lib/samba/perfmon 2> /dev/null
 in
 start)
        /opt/samba/bin/perfcount -d -f /var/lib/samba/perfmon 2> /dev/null
@@ -47,7 +47,7 @@ stop)
 
 status)
        pid=`ps aux | grep perfcount | egrep -v '(grep|perfcountd)' | awk '{print $2}'`
 
 status)
        pid=`ps aux | grep perfcount | egrep -v '(grep|perfcountd)' | awk '{print $2}'`
-       if [ "$pid" == "" ]; then
+       if [ x"$pid" = "x" ]; then
                echo "Dead!"
                exit 2;
        fi
                echo "Dead!"
                exit 2;
        fi