Be less picky about precise name of process in init script.
[openvswitch] / debian / openflow-switch.init
index 74ec2699be6f0f531c9522492873018ac03d2011..2d0ff60f7119bf4efdf110dfd482bc2f5098e4da 100755 (executable)
@@ -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()