Install systemd init scripts on Linux
Guido Günther
11 years ago
0 | From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> | |
1 | Date: Tue, 26 Jun 2012 09:30:39 +0200 | |
2 | Subject: Debianize systemd service files | |
3 | ||
4 | --- | |
5 | daemon/libvirtd.service.in | 4 ++-- | |
6 | tools/libvirt-guests.service.in | 2 +- | |
7 | 2 files changed, 3 insertions(+), 3 deletions(-) | |
8 | ||
9 | diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in | |
10 | index 33724ee..9b2c443 100644 | |
11 | --- a/daemon/libvirtd.service.in | |
12 | +++ b/daemon/libvirtd.service.in | |
13 | @@ -8,8 +8,8 @@ Description=Virtualization daemon | |
14 | Before=libvirt-guests.service | |
15 | ||
16 | [Service] | |
17 | -EnvironmentFile=-/etc/sysconfig/libvirtd | |
18 | -ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS | |
19 | +EnvironmentFile=-/etc/default/libvirt-bin | |
20 | +ExecStart=@sbindir@/libvirtd $libvirtd_opts | |
21 | ExecReload=/bin/kill -HUP $MAINPID | |
22 | KillMode=process | |
23 | # Override the maximum number of opened files | |
24 | diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in | |
25 | index bc63e91..ea1902a 100644 | |
26 | --- a/tools/libvirt-guests.service.in | |
27 | +++ b/tools/libvirt-guests.service.in | |
28 | @@ -3,7 +3,7 @@ Description=Suspend Active Libvirt Guests | |
29 | After=syslog.target network.target | |
30 | ||
31 | [Service] | |
32 | -EnvironmentFile=-/etc/sysconfig/libvirt-guests | |
33 | +EnvironmentFile=-/etc/default/libvirt-guests | |
34 | # Hack just call traditional service until we factor | |
35 | # out the code | |
36 | ExecStart=/etc/init.d/libvirt-guests start |
9 | 9 | Disable-failing-virnetsockettest.patch |
10 | 10 | Don-t-fail-if-we-can-t-setup-avahi.patch |
11 | 11 | Reduce-udevadm-settle-timeout-to-10-seconds.patch |
12 | debian/Debianize-systemd-service-files.patch |
28 | 28 | WITH_OPENVZ = --with-openvz |
29 | 29 | WITH_NETCF = --with-netcf |
30 | 30 | WITH_SANLOCK = --with-sanlock |
31 | WITH_INIT_SCRIPT = --with-init-script=systemd | |
31 | 32 | ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc)) |
32 | 33 | WITH_NUMA = --with-numactl |
33 | 34 | else |
51 | 52 | WITH_LXC = --without-lxc |
52 | 53 | WITH_NUMA = --without-numactl |
53 | 54 | WITH_NETCF = --without-netcf |
55 | WITH_INIT_SCRIPT = --with-init-script=none | |
54 | 56 | endif |
55 | 57 | |
56 | 58 | DEB_BUILDDIR := $(CURDIR)/debian/build |
69 | 71 | $(WITH_STORAGE_LVM) \ |
70 | 72 | $(WITH_STORAGE_ISCSI) \ |
71 | 73 | $(WITH_STORAGE_DISK) \ |
72 | --with-init-script=none \ | |
74 | $(WITH_INIT_SCRIPT) \ | |
73 | 75 | $(WITH_NUMA) \ |
74 | 76 | --without-selinux \ |
75 | 77 | --without-esx \ |
98 | 100 | cp $(CURDIR)/tools/libvirt-guests.init.sh $(CURDIR)/debian/libvirt-bin.libvirt-guests.init |
99 | 101 | cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default |
100 | 102 | dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71 |
103 | -mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \ | |
104 | debian/libvirt-bin/lib/systemd/system/libvirt-bin.service | |
101 | 105 | rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la |
102 | 106 | |
103 | 107 | for l in $(LOGROTATE); do \ |
109 | 113 | build/libvirt-bin:: |
110 | 114 | # Add empty dir so dh_install doesn't fail on kFreebsd until we have Polkit support |
111 | 115 | mkdir -p debian/tmp/usr/share/polkit-1 |
112 | ||
113 | 116 | |
114 | 117 | binary-install/libvirt-doc:: |
115 | 118 | find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \; |