]> git.proxmox.com Git - openvswitch.git/blob - pvepatches/install-systemd-services.patch
systemd service: use DefaultDependencies=no
[openvswitch.git] / pvepatches / install-systemd-services.patch
1 Index: new/debian/openvswitch-switch.openvswitch-nonetwork.service
2 ===================================================================
3 --- /dev/null
4 +++ new/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
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: new/debian/openvswitch-switch.openvswitch.service
19 ===================================================================
20 --- /dev/null
21 +++ new/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: new/debian/rules
37 ===================================================================
38 --- new.orig/debian/rules
39 +++ new/debian/rules
40 @@ -40,6 +40,7 @@ configure-stamp:
41 dh_testdir
42 test -e configure || ./boot.sh
43 test -d _debian || mkdir _debian
44 + rm debian/openvswitch-switch.init
45 echo $(DEB_BUILD_OPTIONS)
46 echo $$CC
47 cd _debian && ( \
48 @@ -130,8 +131,10 @@ binary-common:
49 dh_installexamples
50 dh_installdebconf
51 dh_installlogrotate
52 - dh_installinit -p "openvswitch-switch" -R -- start 20 S . stop 80 0 6 .
53 - dh_installinit --remaining-packages -R
54 + dh_systemd_enable -p "openvswitch-switch" --name openvswitch
55 + dh_systemd_enable -p "openvswitch-switch" --name openvswitch-nonetwork
56 + dh_installinit
57 + dh_systemd_start -p "openvswitch-switch" --name openvswitch-nonetwork --restart-after-upgrade
58 dh_installcron
59 dh_installman --language=C
60 dh_link
61 Index: new/debian/control
62 ===================================================================
63 --- new.orig/debian/control
64 +++ new/debian/control
65 @@ -6,7 +6,8 @@ Uploaders: Ben Pfaff <pfaffben@debian.or
66 Build-Depends:
67 debhelper (>= 8), autoconf (>= 2.64), automake (>= 1.10) | automake1.10,
68 libssl-dev, bzip2, openssl, graphviz,
69 - python-all (>= 2.6.6-3~), procps, libtool
70 + python-all (>= 2.6.6-3~), procps, libtool,
71 + dh-systemd (>= 1.4)
72 Standards-Version: 3.9.3
73 Homepage: http://openvswitch.org/
74
75 @@ -48,7 +49,7 @@ Description: Open vSwitch common compone
76 Package: openvswitch-switch
77 Architecture: linux-any
78 Suggests: openvswitch-datapath-module
79 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, openvswitch-common (= ${binary:Version}), kmod | module-init-tools, procps, uuid-runtime, netbase, python-argparse
80 +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, openvswitch-common (= ${binary:Version}), kmod | module-init-tools, procps, uuid-runtime, netbase, python-argparse, systemd
81 Description: Open vSwitch switch implementations
82 Open vSwitch is a production quality, multilayer, software-based,
83 Ethernet virtual switch. It is designed to enable massive network
84 Index: new/Makefile.in
85 ===================================================================
86 --- new.orig/Makefile.in
87 +++ new/Makefile.in
88 @@ -762,7 +762,7 @@ am__noinst_HEADERS_DIST = BUILD.Windows
89 debian/openvswitch-ipsec.install debian/openvswitch-pki.dirs \
90 debian/openvswitch-pki.postinst debian/openvswitch-pki.postrm \
91 debian/openvswitch-switch.README.Debian \
92 - debian/openvswitch-switch.dirs debian/openvswitch-switch.init \
93 + debian/openvswitch-switch.dirs \
94 debian/openvswitch-switch.install \
95 debian/openvswitch-switch.logrotate \
96 debian/openvswitch-switch.manpages \
97 @@ -1180,7 +1180,7 @@ EXTRA_DIST = BUILD.Windows CONTRIBUTING
98 debian/openvswitch-ipsec.install debian/openvswitch-pki.dirs \
99 debian/openvswitch-pki.postinst debian/openvswitch-pki.postrm \
100 debian/openvswitch-switch.README.Debian \
101 - debian/openvswitch-switch.dirs debian/openvswitch-switch.init \
102 + debian/openvswitch-switch.dirs \
103 debian/openvswitch-switch.install \
104 debian/openvswitch-switch.logrotate \
105 debian/openvswitch-switch.manpages \
106 Index: new/debian/automake.mk
107 ===================================================================
108 --- new.orig/debian/automake.mk
109 +++ new/debian/automake.mk
110 @@ -26,7 +26,6 @@ EXTRA_DIST += \
111 debian/openvswitch-pki.postrm \
112 debian/openvswitch-switch.README.Debian \
113 debian/openvswitch-switch.dirs \
114 - debian/openvswitch-switch.init \
115 debian/openvswitch-switch.install \
116 debian/openvswitch-switch.logrotate \
117 debian/openvswitch-switch.manpages \