diff options
-rwxr-xr-x | rc.d/rc.sysinit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 8b42d2f1..8485c6e5 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -722,6 +722,13 @@ if [ -n "$SELINUX_STATE" ]; then restorecon /etc/mtab /etc/ld.so.cache /etc/blkid/blkid.tab /etc/resolv.conf >/dev/null 2>&1 fi +# If relabeling, relabel mount points. +if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then + if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel ; then + retstorecon $(awk '!/^#/ && $4 !~ /noauto/ { print $2 }' /etc/fstab) >/dev/null 2>&1 + fi +fi + # Clear mtab (> /etc/mtab) &> /dev/null |