X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rhel%2Fetc_sysconfig_network-scripts_ifup-ovs;h=3ad86ff1c94fdd9ba5a79d22ecedc0819b1ae0b3;hb=HEAD;hp=8904c59b909fed25fd96a7e6e157f9b3a53f82f1;hpb=780325b5b8d4c0552b4b7719e0a38200d99f6b08;p=sliver-openvswitch.git diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs index 8904c59b9..3ad86ff1c 100755 --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs @@ -60,7 +60,16 @@ fi fi done -[ -f /var/lock/subsys/openvswitch ] || /sbin/service openvswitch start +SERVICE_UNIT=/usr/lib/systemd/system/openvswitch-nonetwork.service +if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then + if ! systemctl --quiet is-active openvswitch-nonetwork.service; then + systemctl start openvswitch-nonetwork.service + fi +else + if [ ! -f /var/lock/subsys/openvswitch ]; then + /sbin/service openvswitch start + fi +fi case "$TYPE" in OVSBridge) @@ -106,7 +115,12 @@ case "$TYPE" in OVSIntPort) ifup_ovs_bridge ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=internal ${OVS_EXTRA+-- $OVS_EXTRA} - ${OTHERSCRIPT} ${CONFIG} ${2} + if [ -n "${OVSDHCPINTERFACES}" ]; then + for _iface in ${OVSDHCPINTERFACES}; do + /sbin/ifup ${_iface} + done + fi + BOOTPROTO="${OVSBOOTPROTO}" ${OTHERSCRIPT} ${CONFIG} ${2} ;; OVSBond) ifup_ovs_bridge @@ -117,6 +131,15 @@ case "$TYPE" in ${OTHERSCRIPT} ${CONFIG} ${2} OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE" ;; + OVSTunnel) + ifup_ovs_bridge + 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