commit:     1ab8541a6ccb9d72c6faeaf2d616fc49f6cdfaf6
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Wed Feb 28 17:24:55 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Feb 28 17:24:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1ab8541a

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

Reply via email to