X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rhel%2Fetc_sysconfig_network-scripts_ifdown-ovs;h=6e96d62a28fcea17e8c8ce08571759cb3ec9f55b;hb=HEAD;hp=8e768c8a37df66f3be1417778e31d25829cf67a2;hpb=2431be1b68d386bd616378d2c528242775c4d54a;p=sliver-openvswitch.git diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs b/rhel/etc_sysconfig_network-scripts_ifdown-ovs index 8e768c8a3..6e96d62a2 100755 --- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs @@ -34,7 +34,16 @@ if [ ! -x ${OTHERSCRIPT} ]; then OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth" fi -[ -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) @@ -47,6 +56,9 @@ case "$TYPE" in retval=$? ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" ;; + OVSPatchPort) + ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" + ;; *) echo $"Invalid OVS interface type $TYPE" exit 1