Bring UP baremetal bridge

On some distros releases (Fedora 22 for example) interface is in DOWN state
after creation. Bring it UP.

Change-Id: I402d80ca06bff1012cf45b19e05f38314cca54dc
This commit is contained in:
vsaienko 2016-01-08 13:33:01 +02:00
parent 4d7f766469
commit ed3d71c658

View File

@ -16,8 +16,9 @@ BRIDGE_NAME=brbm$BRIDGE_SUFFIX
export VIRSH_DEFAULT_CONNECT_URI="$LIBVIRT_CONNECT_URI"
# Only add bridge if missing
# Only add bridge if missing. Bring it UP.
(sudo ovs-vsctl list-br | grep ${BRIDGE_NAME}$) || sudo ovs-vsctl add-br ${BRIDGE_NAME}
sudo ifconfig ${BRIDGE_NAME} up
# Remove bridge before replacing it.
(virsh net-list | grep "${BRIDGE_NAME} ") && virsh net-destroy ${BRIDGE_NAME}