aboutsummaryrefslogtreecommitdiff
path: root/sh/init-early.sh.Linux.in
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2018-02-28 11:24:55 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-28 11:24:55 -0600
commit1ab8541a6ccb9d72c6faeaf2d616fc49f6cdfaf6 (patch)
treea77cf65a0115ed03b754441c45b182de964c5a04 /sh/init-early.sh.Linux.in
parent038c03bef315314ddb1e460c67d29b2599b494ad (diff)
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.
Diffstat (limited to 'sh/init-early.sh.Linux.in')
-rw-r--r--sh/init-early.sh.Linux.in3
1 files changed, 3 insertions, 0 deletions
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