openrc/init.d/procfs.in

28 lines
663 B
Plaintext
Raw Normal View History

#!@SBINDIR@/openrc-run
2009-05-01 19:41:40 +05:30
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
description="Mounts misc filesystems in /proc."
depend()
{
2009-05-11 20:01:52 +05:30
use modules devfs
2008-03-03 02:43:21 +05:30
need localmount
keyword -openvz -prefix -vserver -lxc
}
start()
{
# Setup Kernel Support for miscellaneous Binary Formats
if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/register ]; then
modprobe -q binfmt-misc
2007-11-28 21:15:03 +05:30
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
return 0
}