]> git.proxmox.com Git - openvswitch.git/blob - pvepatches/use-systemctl-inside-ifupdown.patch
remove openvswitch-switch init script
[openvswitch.git] / pvepatches / use-systemctl-inside-ifupdown.patch
1 Index: new/debian/ifupdown.sh
2 ===================================================================
3 --- new.orig/debian/ifupdown.sh
4 +++ new/debian/ifupdown.sh
5 @@ -29,8 +29,11 @@ if (ovs_vsctl --version) > /dev/null 2>&
6 exit 0
7 fi
8
9 -if /etc/init.d/openvswitch-switch status > /dev/null 2>&1; then :; else
10 - /etc/init.d/openvswitch-switch start
11 +SERVICE_UNIT=/lib/systemd/system/openvswitch-nonetwork.service
12 +if [ -f $SERVICE_UNIT ] && [ -x /bin/systemctl ]; then
13 + if ! systemctl --quiet is-active openvswitch-nonetwork.service; then
14 + systemctl --ignore-dependencies start openvswitch-nonetwork.service
15 + fi
16 fi
17
18 if [ "${MODE}" = "start" ]; then