]> git.proxmox.com Git - openvswitch.git/blob - pvepatches/install-systemd-services.patch
remove openvswitch-switch init script
[openvswitch.git] / pvepatches / install-systemd-services.patch
1 Index: devel/debian/openvswitch-switch.openvswitch-nonetwork.service
2 ===================================================================
3 --- /dev/null
4 +++ devel/debian/openvswitch-switch.openvswitch-nonetwork.service
5 @@ -0,0 +1,12 @@
6 +[Unit]
7 +Description=Open vSwitch Internal Unit
8 +
9 +DefaultDependencies=no
10 +After=local-fs.target systemd-tmpfiles-setup.service pvenetcommit.service
11 +
12 +[Service]
13 +Type=oneshot
14 +RemainAfterExit=yes
15 +EnvironmentFile=-/etc/sysconfig/openvswitch
16 +ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random $OPTIONS
17 +ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
18 Index: devel/debian/openvswitch-switch.openvswitch.service
19 ===================================================================
20 --- /dev/null
21 +++ devel/debian/openvswitch-switch.openvswitch.service
22 @@ -0,0 +1,13 @@
23 +[Unit]
24 +Description=Open vSwitch
25 +After=syslog.target network.target openvswitch-nonetwork.service
26 +Requires=openvswitch-nonetwork.service
27 +
28 +[Service]
29 +Type=oneshot
30 +ExecStart=/bin/true
31 +ExecStop=/bin/true
32 +RemainAfterExit=yes
33 +
34 +[Install]
35 +WantedBy=multi-user.target
36 Index: devel/debian/rules
37 ===================================================================
38 --- devel.orig/debian/rules
39 +++ devel/debian/rules
40 @@ -53,7 +53,10 @@ override_dh_install:
41 cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template
42
43 override_dh_installinit:
44 - dh_installinit -R
45 + dh_systemd_enable -p "openvswitch-switch" --name openvswitch
46 + dh_systemd_enable -p "openvswitch-switch" --name openvswitch-nonetwork
47 + dh_installinit
48 + dh_systemd_start -p "openvswitch-switch" --name openvswitch-nonetwork --restart-after-upgrade
49
50 override_dh_strip:
51 dh_strip --dbg-package=openvswitch-dbg
52 Index: devel/debian/control
53 ===================================================================
54 --- devel.orig/debian/control
55 +++ devel/debian/control
56 @@ -14,6 +14,7 @@ Build-Depends: graphviz,
57 openssl,
58 procps,
59 python-all (>= 2.7),
60 + dh-systemd (>= 1.4),
61 python-six
62 Standards-Version: 3.9.3
63 Homepage: http://openvswitch.org/
64 @@ -51,7 +52,8 @@ Depends: kmod | module-init-tools,
65 uuid-runtime,
66 ${misc:Depends},
67 ${python:Depends},
68 - ${shlibs:Depends}
69 + ${shlibs:Depends},
70 + systemd
71 Description: Open vSwitch switch implementations
72 Open vSwitch is a production quality, multilayer, software-based,
73 Ethernet virtual switch. It is designed to enable massive network
74 Index: devel/debian/automake.mk
75 ===================================================================
76 --- devel.orig/debian/automake.mk
77 +++ devel/debian/automake.mk
78 @@ -27,7 +27,6 @@ EXTRA_DIST += \
79 debian/openvswitch-pki.postrm \
80 debian/openvswitch-switch.README.Debian \
81 debian/openvswitch-switch.dirs \
82 - debian/openvswitch-switch.init \
83 debian/openvswitch-switch.install \
84 debian/openvswitch-switch.logrotate \
85 debian/openvswitch-switch.manpages \