xenserver: Correct "service vswitch status" when brcompatd is disabled
authorIan Campbell <Ian.Campbell@citrix.com>
Fri, 2 Oct 2009 10:32:10 +0000 (11:32 +0100)
committerBen Pfaff <blp@nicira.com>
Fri, 2 Oct 2009 18:07:05 +0000 (11:07 -0700)
I don't think it makes sense to report brcompatd's status when it is
explicitly disabled. Doing so causes service status to return an error
when brcompatd is deliberately disabled.

Also fix up a tab vs. spaces whitespace snafu.

xenserver/etc_init.d_vswitch

index 872383c..e79a536 100755 (executable)
@@ -268,7 +268,7 @@ function start {
 
     start_vswitchd
     if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
-       start_brcompatd
+        start_brcompatd
     fi
     reload_vswitchd  # ensures ovs-vswitchd has fully read config file.
     touch /var/lock/subsys/vswitch
@@ -311,7 +311,9 @@ case "$1" in
         ;;
     status)
         status -p ovs-vswitchd.pid ovs-vswitchd
-        status -p ovs-brcompatd.pid ovs-brcompatd
+        if [ "$ENABLE_BRCOMPAT" = "y" ] ; then
+            status -p ovs-brcompatd.pid ovs-brcompatd
+        fi
         ;;
     version)
         /usr/sbin/ovs-vswitchd -V