From 8e35de888bde8b123bf19c23cb4e8974cb75475e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 30 Aug 2011 15:17:14 -0400 Subject: selinuxfs moved, adjust code. (#733759) --- rc.d/rc.sysinit | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index fd907f4a..5248cfb1 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -36,9 +36,9 @@ PLYMOUTH= # Check SELinux status SELINUX_STATE= -if [ -e "/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then - if [ -r "/selinux/enforce" ] ; then - SELINUX_STATE=$(cat "/selinux/enforce") +if [ -e "/sys/fs/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then + if [ -r "/sys/fs/selinux/enforce" ] ; then + SELINUX_STATE=$(cat "/sys/fs/selinux/enforce") else # assume enforcing if you can't read it SELINUX_STATE=1 @@ -53,7 +53,7 @@ disable_selinux() { echo $"*** Warning -- SELinux is active" echo $"*** Disabling security enforcement for system recovery." echo $"*** Run 'setenforce 1' to reenable." - echo "0" > "/selinux/enforce" + echo "0" > "/sys/fs/selinux/enforce" } relabel_selinux() { @@ -61,7 +61,7 @@ relabel_selinux() { # wrong context, so a reboot will be required after relabel AUTORELABEL= . /etc/selinux/config - echo "0" > /selinux/enforce + echo "0" > /sys/fs/selinux/enforce [ -n "$PLYMOUTH" ] && plymouth --hide-splash if [ "$AUTORELABEL" = "0" ]; then @@ -231,9 +231,9 @@ elif [ -f /.autofsck ]; then echo $"*** Warning -- the system did not shut down cleanly. " echo $"*** Dropping you to a shell; the system will continue" echo $"*** when you leave the shell." - [ -n "$SELINUX_STATE" ] && echo "0" > /selinux/enforce + [ -n "$SELINUX_STATE" ] && echo "0" > /sys/fs/selinux/enforce sulogin - [ -n "$SELINUX_STATE" ] && echo "1" > /selinux/enforce + [ -n "$SELINUX_STATE" ] && echo "1" > /sys/fs/selinux/enforce [ -n "$PLYMOUTH" ] && plymouth --show-splash fi fsckoptions="$AUTOFSCK_OPT $fsckoptions" -- cgit v1.2.1