procfs: simplify the binfmt_misc mount check

Replace the `mountinfo` exec with a file test of the register file
which we rely on later anyways.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-09-18 15:50:12 -04:00
parent f52dca6984
commit fb485366e6

View File

@ -38,8 +38,7 @@ start()
fi
# Setup Kernel Support for miscellaneous Binary Formats
if [ -d /proc/sys/fs/binfmt_misc ] \
&& ! mountinfo -q /proc/sys/fs/binfmt_misc; then
if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/register ]; then
if grep -qs binfmt_misc /proc/filesystems; then
ebegin "Mounting misc binary format filesystem"
mount -t binfmt_misc -o nodev,noexec,nosuid \