ovsdbmonitor: add .desktop file
[sliver-openvswitch.git] / utilities / ovs-ctl.in
index 5640ee8..9bdb3df 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Nicira Networks, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -52,6 +52,10 @@ insert_openvswitch_mod_if_required () {
 }
 
 insert_brcompat_mod_if_required () {
+    if test -e /sys/module/bridge; then
+        log_warning_msg "bridge module is loaded, not loading brcompat_mod"
+        return 1
+    fi
     test -e /sys/module/brcompat_mod && return 0
     action "Inserting brcompat module" modprobe brcompat_mod
 }
@@ -199,9 +203,10 @@ start () {
     if daemon_is_running ovs-vswitchd; then
        log_success_msg "ovs-vswitchd is already running"
     else
-       # Increase the limit on the number of open file descriptors since
-       # ovs-vswitchd needs a few per bridge
-       ulimit -n 4096
+       # Increase the limit on the number of open file descriptors.
+       # ovs-vswitchd needs 16 per datapath, plus a few extra, so this
+       # should allow for 256 (or more) bridges.
+       ulimit -n 5000
 
        # Start ovs-vswitchd.
        set ovs-vswitchd unix:"$DB_SOCK"