From 741b3c5f2b0b40eac35948fb0c02526a12e04c03 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 29 Nov 2004 22:46:35 +0000 Subject: only run restorecon if absolutely necessary (restorecon will check is_selinux_enabled anyway) --- rc.d/rc.sysinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d/rc.sysinit') 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 -- cgit v1.2.1