[ovs-dev] [PATCH] initscript: pass complete path to pidfile to status command

Ian Campbell ian.campbell at citrix.com
Thu Dec 17 14:46:52 UTC 2009


Older versions of RHEL/CentOS used pifof in preference to the pidfile
and hence we got away with passing just the basename instead of
including the full path. Using pidof first doesn't make much sense and
this was fixed in RHEL 5 update 4 (see https://bugzilla.redhat.com/show_bug.cgi?id=440658)

This means that on RHEL 5.4 "service vswitch status" always returned
"ovs-vswitchd is stopped" even if it was running. Fix this issue by
passing in the correct pidfile name.

Signed-off-by: Ian Campbell <ian.campbell at citrix.com>

diff -r 22387d1e8455 -r 6395e28f08c2 xenserver/etc_init.d_vswitch
--- a/xenserver/etc_init.d_vswitch	Thu Dec 17 14:36:51 2009 +0000
+++ b/xenserver/etc_init.d_vswitch	Thu Dec 17 14:44:57 2009 +0000
@@ -318,10 +318,10 @@
         strace -p $(cat "$BRCOMPATD_PIDFILE") "$@"
         ;;
     status)
-        status -p ovs-vswitchd.pid ovs-vswitchd
+        status -p "$VSWITCHD_PIDFILE" ovs-vswitchd
         rc=$?
         if [ $rc -eq 0 ] && [ "$ENABLE_BRCOMPAT" = "y" ] ; then
-            status -p ovs-brcompatd.pid ovs-brcompatd
+            status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd
             rc=$?
         fi
         exit $rc




More information about the dev mailing list