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, 26 Mar 2010 21:42:33 +0000 (14:42 -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_openvswitch

index f531d45..0101562 100755 (executable)
@@ -384,7 +384,9 @@ function start {
     set_system_uuid
 
     start_vswitchd
-    start_brcompatd
+    if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
+        start_brcompatd
+    fi
     touch /var/lock/subsys/openvswitch
 }
 
@@ -423,7 +425,9 @@ case "$1" in
     status)
         status -p "$OVSDB_SERVER_PIDFILE" ovsdb-server
         status -p "$VSWITCHD_PIDFILE" ovs-vswitchd
-        status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd
+        if [ "$ENABLE_BRCOMPAT" = "y" ] ; then
+            status -p ovs-brcompatd.pid ovs-brcompatd
+        fi
         ;;
     version)
         /usr/sbin/ovsdb-server -V