diff options
-rwxr-xr-x | rc.d/rc.sysinit | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 708b0dc5..2ab733a2 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -490,11 +490,14 @@ if [ -x /sbin/quotaon ]; then fi # Check to see if a full relabel is needed -if [ -n "$SELINUX" -a -f /.autorelabel ]; then - relabel_selinux -fi -if [ -n "$SELINUX" ] && strstr "$cmdline" autorelabel ; then - relabel_selinux +if [ -n "$SELINUX" ]; then + if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel ; then + relabel_selinux + fi +else + if [ -d /etc/selinux ]; then + [ -f /.autorelabel ] || touch /.autorelabel + fi fi |