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.
This commit is contained in:
Jason Zaman 2018-02-28 11:24:55 -06:00 committed by William Hubbs
parent 038c03bef3
commit 1ab8541a6c

View File

@ -33,6 +33,9 @@ else
kmode="-a" kmode="-a"
fi 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 # Try and set a font and as early as we can
if service_present "$RC_DEFAULTLEVEL" consolefont || if service_present "$RC_DEFAULTLEVEL" consolefont ||
service_present "$RC_BOOTLEVEL" consolefont; then service_present "$RC_BOOTLEVEL" consolefont; then