From: Ben Pfaff Date: Wed, 23 Jul 2008 21:54:19 +0000 (-0700) Subject: Be less picky about precise name of process in init script. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=28318b5fdf26d6960b84e69aff1d084ab4a9f60c;p=sliver-openvswitch.git Be less picky about precise name of process in init script. The previous version always printed ERROR because for whatever reason we were comparing "/usr/sbin/secchan" against "secchan", which of course failed. --- diff --git a/debian/openflow-switch.init b/debian/openflow-switch.init index 74ec2699b..2d0ff60f7 100755 --- a/debian/openflow-switch.init +++ b/debian/openflow-switch.init @@ -50,8 +50,14 @@ running_pid() [ ! -d /proc/$pid ] && return 1 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` # Is this the expected child? - [ "$cmd" != "$name" ] && return 1 - return 0 + case $cmd in + $name|*/$name) + return 0 + ;; + *) + return 1 + ;; + esac } running()