OVSBRIDGECONFIGURED="yes"
fi
+ # If MACADDR is provided in the interface configuration file,
+ # we need to set it using ovs-vsctl; setting it with the "ip"
+ # command in ifup-eth does not make the change persistent.
+ if [ -n "$MACADDR" ]; then
+ ovs-vsctl -t ${TIMEOUT} -- set bridge "$DEVICE" \
+ other-config:hwaddr="$MACADDR"
+ fi
+
# When dhcp is enabled, the assumption is that there will be a port to
# attach (otherwise, we can't reach out for dhcp). So, we do not
# configure the bridge through rhel's ifup infrastructure unless
for _iface in $BOND_IFACES; do
/sbin/ifup ${_iface}
done
- ovs-vsctl -t ${TIMEOUT} -- --fake-iface add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
- ${OTHERSCRIPT} ${CONFIG} ${2}
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
;;
OVSTunnel)
ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=$OVS_TUNNEL_TYPE $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
${OTHERSCRIPT} ${CONFIG} ${2}
;;
+ OVSPatchPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=patch options:peer="${OVS_PATCH_PEER}" ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
*)
echo $"Invalid OVS interface type $TYPE"
exit 1