diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2011-12-08 13:30:24 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2011-12-08 15:48:49 +0000 |
commit | 478a4d07ac489e9a52defe65290f1aeedc92393a (patch) | |
tree | 0c5caff68a7134f25a4fd29ceef744cee5001b67 | |
parent | 011a3350bef4d4c343f2a0182cafe3c4904c66a8 (diff) | |
download | libvirt-478a4d07ac489e9a52defe65290f1aeedc92393a.tar.gz |
Fix installation of libvirt-guests.service
The installation rules for the libvirt-guests.service were
totally broken
- Installing in the wrong location
- The location was not overridable
- The install-systemd rule was not invoked anywhere
- The install-systemd rule was not invoking install-initscript
which it depends on
- The installed service file lacked a .service extension
* tools/Makefile.am: Fix install of libvirt-guests.service
-rw-r--r-- | tools/Makefile.am | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index c735398ae3..25f0ffefd6 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -148,9 +148,9 @@ endif virsh.1: virsh.pod $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ -install-data-local: install-init +install-data-local: install-init install-systemd -uninstall-local: uninstall-init +uninstall-local: uninstall-init uninstall-systemd install-sysconfig: mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig @@ -162,17 +162,20 @@ uninstall-sysconfig: EXTRA_DIST += libvirt-guests.init.sh -if LIBVIRT_INIT_SCRIPT_RED_HAT -install-init: libvirt-guests.init install-sysconfig +install-initscript: libvirt-guests.init mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d $(INSTALL_SCRIPT) libvirt-guests.init \ $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests -uninstall-init: install-sysconfig +uninstall-initscript: rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests -BUILT_SOURCES += libvirt-guests.init + +if LIBVIRT_INIT_SCRIPT_RED_HAT +BUILT_SOURCES += libvirt-guests.init +install-init: install-sysconfig install-initscript +uninstall-init: uninstall-sysconfig uninstall-initscript else install-init: uninstall-init: @@ -194,14 +197,16 @@ libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status EXTRA_DIST += libvirt-guests.service.in +SYSTEMD_UNIT_DIR = /lib/systemd/system + if LIBVIRT_INIT_SCRIPT_SYSTEMD -install-systemd: libvirt-guests.service install-sysconfig - mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/systemd.d +install-systemd: libvirt-guests.service install-initscript install-sysconfig + mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR) $(INSTALL_SCRIPT) libvirt-guests.service \ - $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service -uninstall-systemd: install-sysconfig - rm -f $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests +uninstall-systemd: uninstall-initscript uninstall-sysconfig + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service BUILT_SOURCES += libvirt-guests.service |