aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-11-29 22:46:35 +0000
committerBill Nottingham <notting@redhat.com>2004-11-29 22:46:35 +0000
commit741b3c5f2b0b40eac35948fb0c02526a12e04c03 (patch)
treeb6d02ca9623218a74951e714f737d7ab72eb60e6 /rc.d
parent75716eb0c22aecef7975ef1194b3d895355bcc45 (diff)
downloadinitscripts-741b3c5f2b0b40eac35948fb0c02526a12e04c03.tar
initscripts-741b3c5f2b0b40eac35948fb0c02526a12e04c03.tar.gz
initscripts-741b3c5f2b0b40eac35948fb0c02526a12e04c03.tar.bz2
initscripts-741b3c5f2b0b40eac35948fb0c02526a12e04c03.tar.xz
initscripts-741b3c5f2b0b40eac35948fb0c02526a12e04c03.zip
only run restorecon if absolutely necessary (restorecon will check
is_selinux_enabled anyway)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 054750e3..fdbebbc8 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -40,7 +40,7 @@ if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then
fi
fi
-if [ -x /sbin/restorecon ] && LC_ALL=C fgrep -q " /dev " /proc/mounts ; then
+if [ -n "$SELINUX" -a -x /sbin/restorecon ] && LC_ALL=C fgrep -q " /dev " /proc/mounts ; then
/sbin/restorecon -R /dev 2>/dev/null
fi