From 1ab8541a6ccb9d72c6faeaf2d616fc49f6cdfaf6 Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Wed, 28 Feb 2018 11:24:55 -0600 Subject: [PATCH] init-early.sh.Linux.in: apply the selinux label to /dev/console early /dev/console is relabelled later in the devfs init script, but by then we have already missed some of the messages, so fix that label early. --- sh/init-early.sh.Linux.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sh/init-early.sh.Linux.in b/sh/init-early.sh.Linux.in index 1898c440..f07bc11b 100644 --- a/sh/init-early.sh.Linux.in +++ b/sh/init-early.sh.Linux.in @@ -33,6 +33,9 @@ else kmode="-a" fi +# Set the SELinux label on console before everything so we dont lose output +[ -x /sbin/restorecon ] && /sbin/restorecon -F /dev/console + # Try and set a font and as early as we can if service_present "$RC_DEFAULTLEVEL" consolefont || service_present "$RC_BOOTLEVEL" consolefont; then