Author: glen
Date: Fri May 31 01:16:37 2013
New Revision: 12686

Modified:
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
/sys is likely already mounted, fgrep /proc/filesystems

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Fri May 31 01:16:37 2013
@@ -108,7 +108,7 @@
                return
        fi
 
-       if ! grep -q selinuxfs /proc/filesystems; then
+       if ! grep -Fq selinuxfs /proc/filesystems; then
                # no support in kernel, no chance
                SELINUX=no
        fi
@@ -367,11 +367,11 @@
        sysctl -e -p /etc/sysctl.conf > /dev/null 2>&1
 
        # sysfs is also needed before any other things (under kernel > 2.5)
-       if grep -q sysfs /proc/filesystems 2>/dev/null; then
-               is_fsmounted sysfs /sys || mount -n -o gid=17 -t sysfs sysfs 
/sys
-               if grep -q securityfs /proc/filesystems 2>/dev/null; then
-                       mount -n -o gid=17 -t securityfs securityfs 
/sys/kernel/security
-               fi
+       if ! is_fsmounted sysfs /sys; then
+               grep -Fq sysfs /proc/filesystems && mount -n -o gid=17 -t sysfs 
sysfs /sys
+       fi
+       if grep -Fq securityfs /proc/filesystems; then
+               mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security
        fi
 
        init_selinux
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to