aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/rc.sysinit28
1 files changed, 9 insertions, 19 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 03490a1e..55b5b435 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -56,43 +56,33 @@ disable_selinux() {
relabel_selinux() {
# if /sbin/init is not labeled correctly this process is running in the
# wrong context, so a reboot will be required after relabel
- REBOOTFLAG=$(restorecon -v /sbin/init)
AUTORELABEL=
. /etc/selinux/config
- if [ "$AUTORELABEL" = "0" ]; then
- rm -f /.autorelabel
+ echo "0" > /selinux/enforce
+ [ -n "$PLYMOUTH" ] && plymouth --hide-splash
- [ -n "$PLYMOUTH" ] && plymouth --hide-splash
+ if [ "$AUTORELABEL" = "0" ]; then
echo
echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required. "
echo $"*** /etc/selinux/config indicates you want to manually fix labeling"
echo $"*** problems. Dropping you to a shell; the system will reboot"
echo $"*** when you leave the shell."
- echo "0" > /selinux/enforce
sulogin
- echo $"Unmounting file systems"
- umount -a
- mount -n -o remount,ro /
- echo $"Automatic reboot in progress."
- reboot -f
else
- [ -n "$PLYMOUTH" ] && plymouth --hide-splash
echo
echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required."
echo $"*** Relabeling could take a very long time, depending on file"
echo $"*** system size and speed of hard drives."
- echo "0" > /selinux/enforce
/sbin/fixfiles -F restore > /dev/null 2>&1
- rm -f /.autorelabel
- if [ ! -z "$REBOOTFLAG" ]; then
- echo $"Automatic reboot in progress."
- reboot -f
- fi
- echo $SELINUX_STATE > /selinux/enforce
- [ -n "$PLYMOUTH" ] && plymouth --show-splash
fi
+ rm -f /.autorelabel
+ echo $"Unmounting file systems"
+ umount -a
+ mount -n -o remount,ro /
+ echo $"Automatic reboot in progress."
+ reboot -f
}
key_is_random() {