2013-12-21 14:51:11 -06:00
|
|
|
#!@SBINDIR@/openrc-run
|
2015-12-04 16:52:19 -06:00
|
|
|
# Copyright (c) 2007-2015 The OpenRC Authors.
|
|
|
|
# See the Authors file at the top-level directory of this distribution and
|
|
|
|
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
|
|
|
|
#
|
|
|
|
# This file is part of OpenRC. It is subject to the license terms in
|
|
|
|
# the LICENSE file found in the top-level directory of this
|
|
|
|
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
|
|
|
|
# This file may not be copied, modified, propagated, or distributed
|
|
|
|
# except according to the terms contained in the LICENSE file.
|
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
|
2015-04-28 21:03:49 -04:00
|
|
|
keyword -openvz -prefix -systemd-nspawn -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
|
|
|
|
}
|