aboutsummaryrefslogtreecommitdiff
path: root/xenserver/etc_init.d_openvswitch
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2009-10-14 11:37:19 +0100
committerBen Pfaff <blp@nicira.com>2010-03-26 14:42:33 -0700
commita1864c5f89fcbec040703e46c709a4799ef72f0b (patch)
tree301cb42d20b363e2d98890c66ad1f650b894007b /xenserver/etc_init.d_openvswitch
parent7c632268f215bc91a26831b171c4ba04a343ae8e (diff)
Ensure "service vswitch status" returns appropriate error code
This command was returning success when vswitchd was not running. Our automated test relies on this command to decide if the host uses vswitch or not. If vswitchd is not OK then brcompatd is not checked at all. Since the return codes apparently have specific meanings I couldn't see a sensible way to combine multiple failure results. (Cherry-picked from xs5.7 branch by Ben Pfaff but merge conflicts meant that the whole thing had to be redone.)
Diffstat (limited to 'xenserver/etc_init.d_openvswitch')
-rwxr-xr-xxenserver/etc_init.d_openvswitch9
1 files changed, 4 insertions, 5 deletions
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index 0101562f..fe8360fe 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -423,11 +423,10 @@ case "$1" in
strace -p $(cat "$BRCOMPATD_PIDFILE") "$@"
;;
status)
- status -p "$OVSDB_SERVER_PIDFILE" ovsdb-server
- status -p "$VSWITCHD_PIDFILE" ovs-vswitchd
- if [ "$ENABLE_BRCOMPAT" = "y" ] ; then
- status -p ovs-brcompatd.pid ovs-brcompatd
- fi
+ status -p "$OVSDB_SERVER_PIDFILE" ovsdb-server &&
+ status -p "$VSWITCHD_PIDFILE" ovs-vswitchd &&
+ (test "$ENABLE_BRCOMPAT" != "y" ||
+ status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd)
;;
version)
/usr/sbin/ovsdb-server -V