X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=xenserver%2Fetc_init.d_vswitch;h=10625289fa4d0e7119e5fd9d92927856c21fc8bc;hb=70feacd5320c141c6f81d9557c0e608326b4d169;hp=ea2db629f29fe59537a7f9230175654045deb3fd;hpb=fea28b07bb69201ebaa1724a95fc764483a72f7d;p=openvswitch diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index ea2db629..10625289 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -80,6 +80,7 @@ brcompatd="/usr/sbin/ovs-brcompatd" dpctl="/usr/bin/ovs-dpctl" appctl="/usr/bin/ovs-appctl" ofctl="/usr/bin/ovs-ofctl" +vsctl="/usr/bin/ovs-vsctl" if [ "$ENABLE_FAKE_PROC_NET" = "y" ]; then @@ -348,18 +349,16 @@ function start { warning "$OVSDB_SERVER_DB does not exist" action "Creating empty $OVSDB_SERVER_DB" $ovsdb_tool create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA" action "Creating initial table in $OVSDB_SERVER_DB" $ovsdb_tool transact "$OVSDB_SERVER_DB" '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' - #elif [ ! -e /var/run/vswitch.booted ]; then - #touch /var/run/vswitch.booted - #/usr/bin/ovs-cfg-mod '-vANY:console:emer' -F "$VSWITCHD_CONF" \ - #'--del-match=bridge.*' \ - #'--del-match=port.*' \ - #'--del-match=bonding.*' \ - #'--del-match=iface.*' \ - #'--del-match=vlan.*.trunks=*' \ - #'--del-match=vlan.*.tag=*' fi start_ovsdb_server + if [ ! -e /var/run/vswitch.booted ]; then + touch /var/run/vswitch.booted + for bridge in $($vsctl list-br); do + $vsctl --no-wait del-br $bridge + done + fi + start_vswitchd start_brcompatd reload_vswitchd # ensures ovs-vswitchd has fully read config. @@ -403,10 +402,12 @@ case "$1" in strace -p $(cat "$BRCOMPATD_PIDFILE") "$@" ;; status) + status -p ovsdb-server.pid ovsdb-server status -p ovs-vswitchd.pid ovs-vswitchd status -p ovs-brcompatd.pid ovs-brcompatd ;; version) + /usr/sbin/ovsdb-server -V /usr/sbin/ovs-vswitchd -V /usr/sbin/ovs-brcompatd -V ;;