ram wipe on shutdown: fix, added need_shutdown hook

Otherwise dracut does not run on shutdown.

Without `need_shutdown` file `/run/initramfs/.need_shutdown` does not get created.
And without that file `/usr/lib/dracut/dracut-initramfs-restore`,
which itself is started by `/lib/systemd/system/dracut-shutdown.service` does nothing.
This commit is contained in:
Patrick Schleizer 2022-06-29 14:13:30 -04:00
parent 4d937f551f
commit 8a072437cc
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,7 @@ install() {
inst_multiple sdmem
inst_multiple dmsetup
inst_hook shutdown 40 "$moddir/wipe.sh"
inst_hook cleanup 80 "$moddir/wipe-needshutdown.sh"
}
# called by dracut

View File

@ -0,0 +1,3 @@
#!/bin/sh
need_shutdown