aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/procfs.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/init.d/procfs.in b/init.d/procfs.in
index 43ba45a4..d86814c6 100644
--- a/init.d/procfs.in
+++ b/init.d/procfs.in
@@ -54,7 +54,18 @@ start()
ebegin "Mounting misc binary format filesystem"
mount -t binfmt_misc -o nodev,noexec,nosuid \
binfmt_misc /proc/sys/fs/binfmt_misc
- eend $?
+ if eend $? ; then
+ local fmts
+ ebegin "Loading custom binary format handlers"
+ fmts=$(grep -hsv -e '^[#;]' -e '^[[:space:]]*$' \
+ /run/binfmt.d/*.conf \
+ "/etc"/binfmt.d/*.conf \
+ ""/usr/lib/binfmt.d/*.conf)
+ if [ -n "${fmts}" ]; then
+ echo "${fmts}" > /proc/sys/fs/binfmt_misc/register
+ fi
+ eend $?
+ fi
fi
fi