summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2011-10-26 01:05:00 +0400
committerWilliam Hubbs <williamh@gentoo.org>2011-10-26 10:35:01 -0500
commitb1da4dcb9913d6d28fa39c60dcf9c867c39486ef (patch)
tree58919dcc3ddb3f583ca61ee31552875af697326a
parent9a539ebbe1ee0c8557fbcdf22e849534dcbd9b53 (diff)
downloadopenrc-b1da4dcb9913d6d28fa39c60dcf9c867c39486ef.tar.gz
openrc-b1da4dcb9913d6d28fa39c60dcf9c867c39486ef.tar.bz2
openrc-b1da4dcb9913d6d28fa39c60dcf9c867c39486ef.tar.xz
Add support for automounting configfs and cgroupfs
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
-rw-r--r--init.d/sysfs.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index ba25090..257f314 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -50,6 +50,26 @@ mount_misc()
eend $?
fi
fi
+
+ # Setup Kernel Support for configfs
+ if [ -d /sys/kernel/config ] && ! mountinfo -q /sys/kernel/config; then
+ if grep -qs configfs /proc/filesystems; then
+ ebegin "Mounting config filesystem"
+ mount -n -t configfs -o nodev,noexec,nosuid \
+ configfs /sys/kernel/config
+ eend $?
+ fi
+ fi
+
+ # Setup Kernel Support for cgroup
+ if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then
+ if grep -qs cgroup /proc/filesystems; then
+ ebegin "Mounting cgroup filesystem"
+ mount -n -t cgroup -o nodev,noexec,nosuid \
+ cgroup /sys/fs/cgroup
+ eend $?
+ fi
+ fi
}
start()