提交 8d59a025 编写于 作者: E Eric Blake

install: fix virtlockd installation

The virtlockd daemon scripts were lousy, when compared to their
counterparts in daemon/Makefile.am.  In particular, when init
scripts were selected, this resulted in 'make distcheck' failing
due to failure to clean up src/virtlockd.init.

* src/Makefile.am (install-systemd): Fix dependencies.  Use MKDIR_P.
(uninstall-systemd): Remove empty directory.  Use fewer processes.
(install-init, install-sysconfig): Use MKDIR_P.
(uninstall-init): Remove correct file, and also empty directory.
(uninstall-sysconfig): Remove empty directory.
(DISTCLEANFILES): Clean up trivially built sources.
上级 c86f53d5
...@@ -1629,26 +1629,29 @@ EXTRA_DIST += locking/virtlockd.sysconf \ ...@@ -1629,26 +1629,29 @@ EXTRA_DIST += locking/virtlockd.sysconf \
locking/test_libvirt_lockd.aug.in locking/test_libvirt_lockd.aug.in
install-sysconfig: install-sysconfig:
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
$(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \ $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
$(DESTDIR)$(sysconfdir)/sysconfig/virtlockd $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
uninstall-sysconfig: uninstall-sysconfig:
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
EXTRA_DIST += locking/virtlockd.init.in EXTRA_DIST += locking/virtlockd.init.in
if WITH_LIBVIRTD if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_RED_HAT if LIBVIRT_INIT_SCRIPT_RED_HAT
install-init:: virtlockd.init install-sysconfig install-init:: virtlockd.init install-sysconfig
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
$(INSTALL_SCRIPT) virtlockd.init \ $(INSTALL_SCRIPT) virtlockd.init \
$(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd
uninstall-init:: uninstall-sysconfig uninstall-init:: uninstall-sysconfig
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
BUILT_SOURCES += virtlockd.init BUILT_SOURCES += virtlockd.init
DISTCLEANFILES += virtlockd.init
else else
install-init:: install-init::
uninstall-init:: uninstall-init::
...@@ -1677,17 +1680,19 @@ if LIBVIRT_INIT_SCRIPT_SYSTEMD ...@@ -1677,17 +1680,19 @@ if LIBVIRT_INIT_SCRIPT_SYSTEMD
SYSTEMD_UNIT_DIR = /lib/systemd/system SYSTEMD_UNIT_DIR = /lib/systemd/system
BUILT_SOURCES += virtlockd.service virtlockd.socket BUILT_SOURCES += virtlockd.service virtlockd.socket
DISTCLEANFILES += virtlockd.service virtlockd.socket
install-systemd: virtlockd.init install-sysconfig install-systemd: virtlockd.service virtlockd.socket install-sysconfig
mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR) $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
$(INSTALL_SCRIPT) virtlockd.service \ $(INSTALL_SCRIPT) virtlockd.service \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
$(INSTALL_SCRIPT) virtlockd.socket \ $(INSTALL_SCRIPT) virtlockd.socket \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
uninstall-systemd: uninstall-sysconfig uninstall-systemd: uninstall-sysconfig
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
else else
install-systemd: install-systemd:
uninstall-systemd: uninstall-systemd:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册