aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-04-20 10:47:24 +0000
committerMike Frysinger <vapier@gentoo.org>2007-04-20 10:47:24 +0000
commita316a1fa7222ea845c546c02cefb71632616d862 (patch)
tree6ebca260d3925dcfcb68cc4ae8f1b1e0cff9bd7f /init.d
parentf269f1961b0b4adc094093301f712294a45dccc8 (diff)
Automatically mount selinuxfs on /selinux in localmount.
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/localmount19
1 files changed, 15 insertions, 4 deletions
diff --git a/init.d/localmount b/init.d/localmount
index 303f5a2c..13172d43 100755
--- a/init.d/localmount
+++ b/init.d/localmount
@@ -75,21 +75,32 @@ start() {
# Setup Kernel Support for miscellaneous Binary Formats
if [ -d /proc/sys/fs/binfmt_misc ] ; then
- if [ -n "$(grep -Fow binfmt_misc /proc/filesystems)" ] ; then
+ if grep -qs binfmt_misc /proc/filesystems ; then
ebegin "Mounting misc binary format filesystem"
mount -t binfmt_misc -o nodev,noexec,nosuid \
binfmt_misc /proc/sys/fs/binfmt_misc
eend $?
fi
fi
+
+ # Setup Kernel Support for securityfs
if [ -d /sys/kernel/security ] ; then
- if [ -n "$(grep -Fow securityfs /proc/filesystems)" ] ; then
+ if grep -qs securityfs /proc/filesystems ; then
ebegin "Mounting security filesystem"
- mount -t securityfs securityfs /sys/kernel/security \
+ mount -t securityfs securityfs /sys/kernel/security \
-o nodev,noexec,nosuid
eend $?
fi
- fi
+ fi
+
+ # Setup Kernel Support for SELinux
+ if [ -d /selinux ] ; then
+ if grep -qs selinuxfs /proc/filesystems ; then
+ ebegin "Mounting SELinux filesystem"
+ mount -t selinuxfs selinuxfs /selinux
+ eend $?
+ fi
+ fi
fi
# We do our swapping here instead of rc so we can get urandom started