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()
|
|
|
|
{
|
2017-03-16 20:46:39 +05:30
|
|
|
after clock
|
2016-08-19 02:55:56 +05:30
|
|
|
use devfs
|
|
|
|
want modules
|
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
|
2016-09-07 04:45:27 +05:30
|
|
|
if [ -d /proc/sys/fs/binfmt_misc ] &&
|
2016-09-12 23:28:01 +05:30
|
|
|
[ ! -e /proc/sys/fs/binfmt_misc/register ]; then
|
2016-09-07 04:45:27 +05:30
|
|
|
if ! grep -qs binfmt_misc /proc/filesystems &&
|
|
|
|
modprobe -q binfmt-misc; then
|
2017-12-15 05:01:57 +05:30
|
|
|
ewarn "The binfmt-misc module needs to be loaded by" \
|
|
|
|
"the modules service or built in."
|
2016-08-19 02:55:56 +05:30
|
|
|
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
|
|
|
|
}
|