X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fetc_init.d_openvswitch;h=a99cc9f89664b6074f0fc964c95e440323748d10;hb=ea7bd5973fb426f3a6ea66b0953c6000980e77ec;hp=fc89a3e919ce8b65dd5fcf509c8954cdd44114e7;hpb=d56d35d2f4ef15c90fae7649887f6b8dc8993b97;p=openvswitch diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index fc89a3e9..a99cc9f8 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -20,8 +20,8 @@ # 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 @@ -166,21 +166,25 @@ function hup_monitor_external_ids { fi } -function dp_list { - "$dpctl" show | grep '^dp[0-9]\+:' | cut -d':' -f 1 -} - function turn_on_corefiles { ulimit -Sc 67108864 } function remove_all_dp { - for dp in $(dp_list); do + for dp in $($dpctl dump-dps); do action "Removing datapath: $dp" "$dpctl" del-dp "$dp" done } 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