2013-12-21 14:51:11 -06:00
|
|
|
#!@SBINDIR@/openrc-run
|
2009-05-01 15:11:40 +01:00
|
|
|
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
|
2011-06-29 19:46:31 -04:00
|
|
|
# Released under the 2-clause BSD license.
|
2007-11-23 12:04:11 +00:00
|
|
|
|
|
|
|
description="Mounts misc filesystems in /proc."
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
depend()
|
|
|
|
{
|
2009-05-11 15:31:52 +01:00
|
|
|
use modules devfs
|
2008-03-02 21:13:21 +00:00
|
|
|
need localmount
|
2012-07-02 22:04:22 -05:00
|
|
|
keyword -openvz -prefix -vserver -lxc
|
2007-11-23 12:04:11 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
start()
|
|
|
|
{
|
2007-11-23 12:04:11 +00:00
|
|
|
# Setup Kernel Support for miscellaneous Binary Formats
|
2011-09-18 15:50:12 -04:00
|
|
|
if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/register ]; then
|
2015-03-31 12:48:45 -05:00
|
|
|
modprobe -q binfmt-misc
|
2007-11-28 15:45:03 +00:00
|
|
|
if grep -qs binfmt_misc /proc/filesystems; then
|
2007-11-23 12:04:11 +00:00
|
|
|
ebegin "Mounting misc binary format filesystem"
|
|
|
|
mount -t binfmt_misc -o nodev,noexec,nosuid \
|
|
|
|
binfmt_misc /proc/sys/fs/binfmt_misc
|
2011-09-18 15:29:01 -04:00
|
|
|
eend $?
|
2007-11-23 12:04:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|