From e4bfff8f0d2c01009759acb8adcab070327b5747 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 17 Dec 2009 10:00:36 -0800 Subject: [PATCH] initscript: pass complete path to pidfile to status command 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. Cross-port of Ian Campbell's commit d1c8c9e4 on xs5.7 branch. --- xenserver/etc_init.d_vswitch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index bd621c10..c8172c81 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -314,8 +314,8 @@ case "$1" in strace -p $(cat "$BRCOMPATD_PIDFILE") "$@" ;; status) - status -p ovs-vswitchd.pid ovs-vswitchd - status -p ovs-brcompatd.pid ovs-brcompatd + status -p "$VSWITCHD_PIDFILE" ovs-vswitchd + status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd ;; version) /usr/sbin/ovs-vswitchd -V -- 2.30.2