summaryrefslogtreecommitdiffstats
path: root/mkinitcpio-generate-shutdown-ramfs.service
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitcpio-generate-shutdown-ramfs.service')
-rw-r--r--mkinitcpio-generate-shutdown-ramfs.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkinitcpio-generate-shutdown-ramfs.service b/mkinitcpio-generate-shutdown-ramfs.service
new file mode 100644
index 0000000..36c2508
--- /dev/null
+++ b/mkinitcpio-generate-shutdown-ramfs.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Generate shutdown-ramfs
+DefaultDependencies=no
+Before=shutdown.target
+ConditionFileIsExecutable=!/run/initramfs/shutdown
+
+[Service]
+Type=oneshot
+# /tmp could be umounted at this point
+# use /run as temporary directory
+Environment=TMPDIR=/run
+ExecStart=/usr/bin/mkinitcpio -A sd-shutdown -c /dev/null -d /run/initramfs
+
+[Install]
+WantedBy=shutdown.target