From 2fa0eb25d47c920c18e7d2498c647a801d836596 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Tue, 19 Nov 2013 23:10:28 +0100 Subject: Add mkinitcpio-generate-shutdown-ramfs.service When enabled, this service generates an "initramfs" that systemd pivots to on shutdown to ensure clean umounting and shutdown of loop and dm devices. The actual work is done by systemd-shutdown. --- mkinitcpio-generate-shutdown-ramfs.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mkinitcpio-generate-shutdown-ramfs.service (limited to 'mkinitcpio-generate-shutdown-ramfs.service') 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 -- cgit v1.2.3-24-g4f1b