From: Sascha Wildner Date: Mon, 18 Oct 2010 10:00:57 +0000 (+0200) Subject: Fix a typo in the vkernel rc script. X-Git-Tag: v2.8.1~51 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/178edca6dd0014c61b2ec136c51c9203cbb4ee39 Fix a typo in the vkernel rc script. Submitted-by: Rumko --- diff --git a/etc/rc.d/vkernel b/etc/rc.d/vkernel index 3b0a928..78ec7c3 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