]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set
authorDavid Tardon <dtardon@redhat.com>
Fri, 11 Mar 2022 13:04:16 +0000 (14:04 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 18 Mar 2022 06:37:23 +0000 (06:37 +0000)
commit24d8f35b9c162f42c58abd27fe9c75bbf76cbfe7
treecf3817cc61eef7d00798f03dcb73d8d745e05c83
parenta38d9ec0320f3819a3b70dc5bb59f6d2fc570149
fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set

It can happen that SELINUXTYPE is not set, e.g., in Fedora/RHEL
installation images /etc/selinux/config is an empty file. That means
that setfiles fails, which makes dracut-initramfs-restore fail too
because it uses "set -x", which means that dracut-shutdown.service
fails. But, after commit 7ab1d00227cad6f1b86ba01fdc766769faebb031, a
failure of dracut-shutdown.service means that the final switch back into
initrd is skipped. Let's just add an additional sanity check to
workaround that.
dracut-initramfs-restore.sh