commit: ba10793b0b85b11fae04e6526716c6f7976afde1
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Sep 6 23:15:27 2016 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep 8 16:53:20 2016 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ba10793b
init.d/procfs: fix binfmt_misc module load warning
This reworks the logic so that the warning about configuring the
binfmt_misc module is only displayed if the module actually has to be
loaded.
init.d/procfs.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/init.d/procfs.in b/init.d/procfs.in
index 055b5f4..36eca7c 100644
--- a/init.d/procfs.in
+++ b/init.d/procfs.in
@@ -22,8 +22,10 @@ depend()
start()
{
# Setup Kernel Support for miscellaneous Binary Formats
- if [ -d /proc/sys/fs/binfmt_misc -a ! -e
/proc/sys/fs/binfmt_misc/register ]; then
- if modprobe -q binfmt-misc; then
+ if [ -d /proc/sys/fs/binfmt_misc ] &&
+ [! -e /proc/sys/fs/binfmt_misc/register ]; then
+ if ! grep -qs binfmt_misc /proc/filesystems &&
+ modprobe -q binfmt-misc; then
ewarn "The binfmt-misc module needs to be configured
in \
@SYSCONFDIR@/conf.d/modules or built in."
fi