Update openvswitch restart for suse

Starting with SLE12 SP2 and with openSUSE Leap the distro-shipped
openvswitch is the normal systemd openvswitch.service service file
and no longer the older openvswitch-switch Sysv5 init script. Add
a special case for that.

Change-Id: I5152f2585c3d4d18853988d6290039d6b1713b99
This commit is contained in:
Dirk Mueller 2016-12-09 00:58:54 +01:00
parent 77a7296248
commit 30b58bfa27

@ -69,7 +69,11 @@ function _neutron_ovs_base_install_agent_packages {
restart_service openvswitch
sudo systemctl enable openvswitch
elif is_suse; then
restart_service openvswitch-switch
if [[ $DISTRO == "sle12" ]] && [[ $os_RELEASE -lt 12.2 ]]; then
restart_service openvswitch-switch
else
restart_service openvswitch
fi
fi
}