Fix a typo in the vkernel rc script.
authorSascha Wildner <saw@online.de>
Mon, 18 Oct 2010 10:00:57 +0000 (12:00 +0200)
committerSascha Wildner <saw@online.de>
Mon, 18 Oct 2010 10:01:56 +0000 (12:01 +0200)
Submitted-by: Rumko
etc/rc.d/vkernel

index 3b0a928..78ec7c3 100644 (file)
@@ -20,7 +20,7 @@ vkernel_start()
                eval pidfile="/var/run/vkernel.${_vkernel}.pid"
                if [ -f "${pidfile}" ]; then
                        eval pid=`cat ${pidfile}`
-                       if [ ! -z "${pid}" -a ! -z "`ps axwwp ${pid} | grep -wE "^[ ]+${pid}" | grep -v grep | awk '{print $1}'`" ]; then
+                       if [ ! -z "${pid}" -a ! -z "`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print $1}'`" ]; then
                                echo
                                warn "Vkernel ${_vkernel} already running? (check ${pidfile})"
                                continue
@@ -107,9 +107,9 @@ vkernel_stop()
 
                # Check that the vkernel ended properly
                cnt=1
-               eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]+${pid}" | grep -v grep | awk '{print $1}'`
+               eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print $1}'`
                while [ ! -z "${temp_pid}" -a "${cnt}" -lt "${_kill_timeout}" ]; do
-                       eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]+${pid}" | grep -v grep | awk '{print $1}'`
+                       eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print $1}'`
                        cnt=`expr $cnt + 1`
                        sleep 1
                done