]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(shutdown): be robust against forced shutdown
authorRenaud Métrich <rmetrich@redhat.com>
Tue, 16 Nov 2021 10:15:52 +0000 (11:15 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Tue, 16 Nov 2021 18:29:32 +0000 (18:29 +0000)
commitb9ba3c8bb8f0f1328cd1ffaa8dbf64585b28c474
tree64b0c36387a3bcaedb99e6f788e1d5c2adb438a5
parent3f56d481e8a3c67c2e795686e6ec3bfc4ea08e1d
fix(shutdown): be robust against forced shutdown

When a forced shutdown is issued through sending a burst of Ctrl-Alt-Del
keys, systemd sends SIGTERM to all processes. This ends up killing
dracut-initramfs-restore as well, preventing the script from detecting
that the unpack of the initramfs is incomplete, which later causes a
crash to happen when "shutdown" tries to execute from the unpacked
initramfs.

This fix makes sure dracut-initramfs-restore remains alive to detect
the unpack failed (because cpio was killed by systemd too).

Refs:
 * https://bugzilla.redhat.com/show_bug.cgi?id=2023665
dracut-initramfs-restore.sh