Skip to content
Snippets Groups Projects
Commit 5f715edb authored by Guido Günther's avatar Guido Günther
Browse files

Install systemd init scripts on Linux

parent e4714b7d
No related branches found
No related tags found
No related merge requests found
......@@ -8,3 +8,4 @@ usr/lib/libvirt/connection-driver
usr/share/augeas/*
usr/share/libvirt/*
usr/share/man/man8/*
lib/systemd/system/*
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 26 Jun 2012 09:30:39 +0200
Subject: Debianize systemd service files
---
daemon/libvirtd.service.in | 4 ++--
tools/libvirt-guests.service.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
index 33724ee..9b2c443 100644
--- a/daemon/libvirtd.service.in
+++ b/daemon/libvirtd.service.in
@@ -8,8 +8,8 @@ Description=Virtualization daemon
Before=libvirt-guests.service
[Service]
-EnvironmentFile=-/etc/sysconfig/libvirtd
-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
+EnvironmentFile=-/etc/default/libvirt-bin
+ExecStart=@sbindir@/libvirtd $libvirtd_opts
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
# Override the maximum number of opened files
diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
index bc63e91..ea1902a 100644
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
@@ -3,7 +3,7 @@ Description=Suspend Active Libvirt Guests
After=syslog.target network.target
[Service]
-EnvironmentFile=-/etc/sysconfig/libvirt-guests
+EnvironmentFile=-/etc/default/libvirt-guests
# Hack just call traditional service until we factor
# out the code
ExecStart=/etc/init.d/libvirt-guests start
......@@ -10,3 +10,4 @@ Disable-gnulib-s-test-nonplocking-pipe.sh.patch
Disable-failing-virnetsockettest.patch
Don-t-fail-if-we-can-t-setup-avahi.patch
Reduce-udevadm-settle-timeout-to-10-seconds.patch
debian/Debianize-systemd-service-files.patch
......@@ -29,6 +29,7 @@ ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
WITH_OPENVZ = --with-openvz
WITH_NETCF = --with-netcf
WITH_SANLOCK = --with-sanlock
WITH_INIT_SCRIPT = --with-init-script=systemd
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc))
WITH_NUMA = --with-numactl
else
......@@ -52,6 +53,7 @@ else
WITH_LXC = --without-lxc
WITH_NUMA = --without-numactl
WITH_NETCF = --without-netcf
WITH_INIT_SCRIPT = --with-init-script=none
endif
DEB_BUILDDIR := $(CURDIR)/debian/build
......@@ -70,7 +72,7 @@ DEB_CONFIGURE_EXTRA_FLAGS := \
$(WITH_STORAGE_LVM) \
$(WITH_STORAGE_ISCSI) \
$(WITH_STORAGE_DISK) \
--with-init-script=none \
$(WITH_INIT_SCRIPT) \
$(WITH_NUMA) \
--without-selinux \
--without-esx \
......@@ -99,6 +101,8 @@ binary-install/libvirt-bin::
cp $(CURDIR)/tools/libvirt-guests.init.sh $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
-mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
debian/libvirt-bin/lib/systemd/system/libvirt-bin.service
rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
for l in $(LOGROTATE); do \
......@@ -111,7 +115,6 @@ build/libvirt-bin::
# Add empty dir so dh_install doesn't fail on kFreebsd until we have Polkit support
mkdir -p debian/tmp/usr/share/polkit-1
binary-install/libvirt-doc::
find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment