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
上级 011a3350
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部