xenserver: Use = instead of == as operator for "test" in shell scripts.
[openvswitch] / xenserver / etc_init.d_vswitch
index 90b0777316be79780b1cbc70cacb8fa473143426..83d84ec2a9b960102dd06d94d6e0d2d0924f1f3d 100755 (executable)
@@ -67,7 +67,7 @@ appctl="$VSWITCH_BASE/bin/ovs-appctl"
 ofctl="$VSWITCH_BASE/bin/ovs-ofctl"
 
 
-if [ "$ENABLE_FAKE_PROC_NET" == "y" ]; then
+if [ "$ENABLE_FAKE_PROC_NET" = "y" ]; then
     if [ "$ENABLE_BRCOMPAT" != "y" ]; then
         warning "FAKE_PROC_NET required BRCOMPAT which was disabled.  Force enabling."
         ENABLE_BRCOMPAT="y"
@@ -149,7 +149,7 @@ function start_vswitchd {
         daemonize="n"
     fi
     local fake_proc_net_opt=""
-    if [ "$ENABLE_FAKE_PROC_NET" == "y" ]; then
+    if [ "$ENABLE_FAKE_PROC_NET" = "y" ]; then
         fake_proc_net_opt="--fake-proc-net"
     fi
     if [ "$daemonize" != "y" ]; then
@@ -253,6 +253,11 @@ function start {
     fi
 
     insert_modules_if_required
+
+    # Increase the limit on the number of open file descriptors since
+    # ovs-vswitchd needs a few per bridge
+    ulimit -n 4096
+
     start_vswitchd
     start_brcompatd
     reload_vswitchd  # ensures ovs-vswitchd has fully read config file.