summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@suse.com>2012-07-20 15:28:31 +0200
committerRay Strode <rstrode@redhat.com>2012-07-21 03:22:37 -0400
commitedde4e0f2b85c6f298569fe219a08361b99b016b (patch)
tree71ebe93f13c9f564fcd2ecd3a6bbfe3f4c7a46dc
parent906477ce305aa500fafe61d62c8867b7452e013c (diff)
systemd: create missing links various targets
-rw-r--r--systemd-units/Makefile.am52
1 files changed, 52 insertions, 0 deletions
diff --git a/systemd-units/Makefile.am b/systemd-units/Makefile.am
index 1545a043..2f5e61f7 100644
--- a/systemd-units/Makefile.am
+++ b/systemd-units/Makefile.am
@@ -13,6 +13,58 @@ systemd_unit_templates = \
if ENABLE_SYSTEMD_INTEGRATION
systemdunitdir=$(SYSTEMD_UNIT_DIR)
systemdunit_DATA = $(systemd_unit_templates:.in=)
+
+install-data-hook:
+ $(MKDIR_P) -m 0755 \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/reboot.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/kexec.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/poweroff.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/halt.target.wants
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants && \
+ rm -f plymouth-start.service plymouth-read-write.service && \
+ $(LN_S) ../plymouth-start.service && \
+ $(LN_S) ../plymouth-read-write.service)
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants && \
+ rm -f plymouth-quit.service plymouth-quit-wait.service && \
+ $(LN_S) ../plymouth-quit.service && \
+ $(LN_S) ../plymouth-quit-wait.service)
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/reboot.target.wants && \
+ rm -f plymouth-reboot.service && \
+ $(LN_S) ../plymouth-reboot.service)
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/kexec.target.wants && \
+ rm -f plymouth-kexec.service && \
+ $(LN_S) ../plymouth-kexec.service)
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/poweroff.target.wants && \
+ rm -f plymouth-poweroff.service && \
+ $(LN_S) ../plymouth-poweroff.service)
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/halt.target.wants && \
+ rm -f plymouth-halt.service && \
+ $(LN_S) ../plymouth-halt.service)
+
+uninstall-hook:
+ rm -f \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants && \
+ rm -f plymouth-start.service plymouth-read-write.service) \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants && \
+ rm -f plymouth-quit.service plymouth-quit-wait.service) \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/reboot.target.wants && \
+ rm -f plymouth-reboot.service) \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/kexec.target.wants && \
+ rm -f plymouth-kexec.service) \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/poweroff.target.wants && \
+ rm -f plymouth-poweroff.service) \
+ (cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/halt.target.wants && \
+ rm -f plymouth-halt.service) \
+ rmdir --ignore-fail-on-non-empty \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/reboot.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/kexec.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/poweroff.target.wants \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/halt.target.wants
+
endif
EXTRA_DIST = $(systemd_unit_templates) $(systemdunit_DATA)