# limitations under the License.
### BEGIN INIT INFO
# Provides: openvswitch-switch
-# Required-Start: $network $named $remote_fs $syslog
-# Required-Stop: $remote_fs
+# Required-Start:
+# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Open vSwitch switch
}
function insert_modules_if_required {
+ if test -e /sys/module/bridge; then
+ bridges=`echo /sys/class/net/*/bridge | sed 's,/sys/class/net/,,g;s,/bridge,,g'`
+ if test "$bridges" != "*"; then
+ log_warning_msg "not removing bridge module because bridges exist ($bridges)"
+ else
+ action "removing bridge module" rmmod bridge
+ fi
+ fi
if ! lsmod | grep -q "openvswitch_mod"; then
action "Inserting llc module" modprobe llc
action "Inserting openvswitch module" modprobe openvswitch_mod