2013-12-22 02:21:11 +05:30
|
|
|
#!@SBINDIR@/openrc-run
|
2015-12-05 04:22:19 +05:30
|
|
|
# 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 17:34:11 +05:30
|
|
|
|
|
|
|
description="Mounts misc filesystems in /proc."
|
|
|
|
|
2008-01-11 17:43:46 +05:30
|
|
|
depend()
|
|
|
|
{
|
2016-08-19 02:55:56 +05:30
|
|
|
use devfs
|
|
|
|
want modules
|
2008-03-03 02:43:21 +05:30
|
|
|
need localmount
|
2016-07-31 23:31:17 +05:30
|
|
|
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
2007-11-23 17:34:11 +05:30
|
|
|
}
|
|
|
|
|
2008-01-11 17:43:46 +05:30
|
|
|
start()
|
|
|
|
{
|
2007-11-23 17:34:11 +05:30
|
|
|
# Setup Kernel Support for miscellaneous Binary Formats
|
2011-09-19 01:20:12 +05:30
|
|
|
if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/register ]; then
|
2016-08-19 02:55:56 +05:30
|
|
|
if modprobe -q binfmt-misc; then
|
|
|
|
ewarn "The binfmt-misc module needs to be configured in \
|
|
|
|
@SYSCONFDIR@/conf.d/modules or built in."
|
|
|
|
fi
|
2007-11-28 21:15:03 +05:30
|
|
|
if grep -qs binfmt_misc /proc/filesystems; then
|
2007-11-23 17:34:11 +05:30
|
|
|
ebegin "Mounting misc binary format filesystem"
|
|
|
|
mount -t binfmt_misc -o nodev,noexec,nosuid \
|
|
|
|
binfmt_misc /proc/sys/fs/binfmt_misc
|
2011-09-19 00:59:01 +05:30
|
|
|
eend $?
|
2007-11-23 17:34:11 +05:30
|
|
|
fi
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|