Merge master branch into xs5.7.
[sliver-openvswitch.git] / xenserver / etc_init.d_vswitch
index bd621c1..8847550 100755 (executable)
@@ -24,8 +24,8 @@
 test -e /etc/sysconfig/vswitch && . /etc/sysconfig/vswitch
 
 # General config variables in /etc/sysconfig/vswitch
-: ${ENABLE_BRCOMPAT:=y}
-: ${ENABLE_FAKE_PROC_NET:=y}
+: ${ENABLE_BRCOMPAT:=n}
+: ${ENABLE_FAKE_PROC_NET:=n}
 : ${FORCE_COREFILES:=y}
 
 # Config variables specific to ovs-vswitchd
@@ -89,7 +89,7 @@ function insert_modules_if_required {
         action "Inserting llc module" modprobe llc
         action "Inserting openvswitch module" modprobe openvswitch_mod
     fi
-    if [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then
+    if [ "$ENABLE_BRCOMPAT" = "y" ] && [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then
         action "Inserting brcompat module" modprobe brcompat_mod
     fi
 }
@@ -273,7 +273,9 @@ function start {
     fi
 
     start_vswitchd
-    start_brcompatd
+    if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
+        start_brcompatd
+    fi
     reload_vswitchd  # ensures ovs-vswitchd has fully read config file.
     touch /var/lock/subsys/vswitch
 }
@@ -315,7 +317,12 @@ case "$1" in
         ;;
     status)
         status -p ovs-vswitchd.pid ovs-vswitchd
-        status -p ovs-brcompatd.pid ovs-brcompatd
+        rc=$?
+        if [ $rc -eq 0 ] && [ "$ENABLE_BRCOMPAT" = "y" ] ; then
+            status -p ovs-brcompatd.pid ovs-brcompatd
+            rc=$?
+        fi
+        exit $rc
         ;;
     version)
         /usr/sbin/ovs-vswitchd -V