aboutsummaryrefslogtreecommitdiff
path: root/init.d/procfs.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-09-06 18:15:27 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-09-08 11:53:20 -0500
commitba10793b0b85b11fae04e6526716c6f7976afde1 (patch)
treee3a325e196e5bf4ff1b543f0cef16984e3f2adf4 /init.d/procfs.in
parentd4d559323819c8a5279bf197d8d3ff80f1e28cdc (diff)
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.
Diffstat (limited to 'init.d/procfs.in')
-rw-r--r--init.d/procfs.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/init.d/procfs.in b/init.d/procfs.in
index 055b5f45..36eca7c0 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