summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2013-11-27 19:35:22 +0100
committerThomas Bächler <thomas@archlinux.org>2013-12-15 15:11:08 +0100
commit7f8b4c38dcdd9ec7b95e10684b5f190a45e46531 (patch)
tree628cfa058161b67f683aa9c5e11962e8886f1189
parentdcd45ba1b54ea0a386442fa17cd1eb4d7396b04a (diff)
downloadmkinitcpio-7f8b4c38dcdd9ec7b95e10684b5f190a45e46531.tar.gz
mkinitcpio-7f8b4c38dcdd9ec7b95e10684b5f190a45e46531.tar.xz
Install mkinitcpio-generate-shutdown-ramfs.service as a static service
Pretty much everyone benefits from this service, as it is always better than having no shutdown-ramfs. If someone puts their own shutdown-ramfs in place, it will likely be done by initramfs and this service will be skipped automatically. In more obscure situations, it can still be masked.
-rw-r--r--Makefile4
-rw-r--r--systemd/mkinitcpio-generate-shutdown-ramfs.service3
2 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0e0edea..f8c8086 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ DIRS = \
/usr/share/man/man5 \
/usr/share/man/man1 \
/usr/share/mkinitcpio \
- /usr/lib/systemd/system \
+ /usr/lib/systemd/system/shutdown.target.wants \
/usr/lib/tmpfiles.d
all: doc
@@ -54,6 +54,8 @@ install: all
install -m644 -t $(DESTDIR)/usr/share/mkinitcpio mkinitcpio.d/*
install -m644 systemd/mkinitcpio-generate-shutdown-ramfs.service \
$(DESTDIR)/usr/lib/systemd/system/mkinitcpio-generate-shutdown-ramfs.service
+ ln -s ../mkinitcpio-generate-shutdown-ramfs.service \
+ $(DESTDIR)/usr/lib/systemd/system/shutdown.target.wants/mkinitcpio-generate-shutdown-ramfs.service
install -m644 tmpfiles/mkinitcpio.conf $(DESTDIR)/usr/lib/tmpfiles.d/mkinitcpio.conf
install -m755 50-mkinitcpio.install $(DESTDIR)/usr/lib/kernel/install.d/50-mkinitcpio.install
diff --git a/systemd/mkinitcpio-generate-shutdown-ramfs.service b/systemd/mkinitcpio-generate-shutdown-ramfs.service
index d5876df..923dd59 100644
--- a/systemd/mkinitcpio-generate-shutdown-ramfs.service
+++ b/systemd/mkinitcpio-generate-shutdown-ramfs.service
@@ -10,6 +10,3 @@ Type=oneshot
# use /run as temporary directory
Environment=TMPDIR=/run
ExecStart=/usr/bin/mkinitcpio -A sd-shutdown -k none -c /dev/null -d /run/initramfs
-
-[Install]
-WantedBy=shutdown.target