procfs: load config files from binfmt.d into /proc/sys/fs/binfmt_misc/register
This is a KISS version. Let's see where we go from here in terms of complexity. Maybe nowhere! X-Gentoo-Bug: 382723 X-Gentoo-Bug-URL: https://bugs.gentoo.org/382723 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
95adeb85ba
commit
47d305d2af
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user