From 28318b5fdf26d6960b84e69aff1d084ab4a9f60c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 23 Jul 2008 14:54:19 -0700 Subject: [PATCH] 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. --- debian/openflow-switch.init | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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() -- 2.43.0