Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tools/Makefile.am | 13 ++-----------
tools/meson.build | 8 ++++++++
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 655e22d95ea..9c6c6b3d3c9 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -29,24 +29,15 @@ install-data-local: install-systemd install-nss \
uninstall-local: uninstall-systemd uninstall-nss \
uninstall-bash-completion
-install-sysconfig:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
-
-uninstall-sysconfig:
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
-
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
if LIBVIRT_INIT_SCRIPT_SYSTEMD
-install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
+install-systemd: libvirt-guests.service libvirt-guests.sh
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
$(INSTALL_DATA) libvirt-guests.service \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
-uninstall-systemd: uninstall-sysconfig
+uninstall-systemd:
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
diff --git a/tools/meson.build b/tools/meson.build
index 446831557e1..b95ced3728b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -261,3 +261,11 @@ configure_file(
install: true,
install_dir: libexecdir,
)
+
+if init_script == 'systemd'
+ install_data(
+ 'libvirt-guests.sysconf',
+ install_dir: sysconfdir / 'sysconfig',
+ rename: 'libvirt-guests',
+ )
+endif
--
2.26.2