diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:43:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:43:00 +0000 |
commit | 89853c290fd822a88c56150dde50aaa1421c0c8c (patch) | |
tree | c88de9d39f187cf339e1add1f768bbda4a61130f /debian/mdadm.mdadm-shutdown.service | |
parent | Adding upstream version 4.2. (diff) | |
download | mdadm-debian.tar.xz mdadm-debian.zip |
Adding debian version 4.2-5.debian/4.2-5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/mdadm.mdadm-shutdown.service')
-rw-r--r-- | debian/mdadm.mdadm-shutdown.service | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/mdadm.mdadm-shutdown.service b/debian/mdadm.mdadm-shutdown.service new file mode 100644 index 0000000..a949b7c --- /dev/null +++ b/debian/mdadm.mdadm-shutdown.service @@ -0,0 +1,22 @@ +[Unit] +Description=Prepare mdadm shutdown initramfs +ConditionFileIsExecutable=/usr/bin/dracut +After=local-fs.target boot.mount boot.automount +Wants=local-fs.target +Before=shutdown.target +Conflicts=shutdown.target umount.target +DefaultDependencies=no +Documentation=man://dracut(8) + +[Service] +RemainAfterExit=yes +Type=oneshot +ExecStart=/bin/true +ExecStop=/bin/mount -o remount,exec,suid /run +ExecStop=/bin/mkdir -p /run/initramfs +ExecStop=/usr/bin/dracut --no-compress --no-kernel --quiet --force --force-add "shutdown mdraid" --omit "caps" /run/initramfs/shutdown.cpio +ExecStop=/bin/sh -c 'cd /run/initramfs; cpio -id --quiet < shutdown.cpio' +ExecStop=/bin/rm /run/initramfs/shutdown.cpio + +[Install] +WantedBy=sysinit.target |