From 178edca6dd0014c61b2ec136c51c9203cbb4ee39 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 18 Oct 2010 12:00:57 +0200 Subject: [PATCH] Fix a typo in the vkernel rc script. Submitted-by: Rumko --- etc/rc.d/vkernel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/vkernel b/etc/rc.d/vkernel index 3b0a928c50..78ec7c3324 100644 --- a/etc/rc.d/vkernel +++ b/etc/rc.d/vkernel @@ -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 -- 2.41.0