X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rhel%2Fetc_sysconfig_network-scripts_ifdown-ovs;h=daa5786592d3085a7d584408178d61a3a16ce9ce;hb=77d9e0eba1cf556a88d8035482492df536cf2360;hp=19047d8ba2464d3e96a4b3d906c2ee50364b7bb1;hpb=cfa9bf12e1fda7733e83dffbe14b2eecbf9a9813;p=sliver-openvswitch.git diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs b/rhel/etc_sysconfig_network-scripts_ifdown-ovs index 19047d8ba..daa578659 100755 --- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs @@ -34,13 +34,24 @@ if [ ! -x ${OTHERSCRIPT} ]; then OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth" fi +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) ${OTHERSCRIPT} ${CONFIG} $2 retval=$? ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE" ;; - OVSPort|OVSIntPort|OVSBond) + OVSPort|OVSIntPort|OVSBond|OVSTunnel) ${OTHERSCRIPT} ${CONFIG} $2 retval=$? ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"