]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
/sys is likely already mounted, fgrep /proc/filesystems
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 30 May 2013 23:16:37 +0000 (23:16 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 30 May 2013 23:16:37 +0000 (23:16 +0000)
svn-id: @12686

rc.d/rc.sysinit

index 3343cd6610d0c3b98c27a67f1a9891279bf20369..0b2484779f568883327ff704897fe8824517f1df 100755 (executable)
@@ -108,7 +108,7 @@ init_selinux() {
                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 @@ if ! is_yes "$VSERVER"; then
        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
This page took 0.057062 seconds and 4 git commands to generate.