summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/qemu/files/qemu-binfmt.initd-r1')
-rw-r--r--app-emulation/qemu/files/qemu-binfmt.initd-r115
1 files changed, 4 insertions, 11 deletions
diff --git a/app-emulation/qemu/files/qemu-binfmt.initd-r1 b/app-emulation/qemu/files/qemu-binfmt.initd-r1
index 53c7ca00234e..4b1dba512f63 100644
--- a/app-emulation/qemu/files/qemu-binfmt.initd-r1
+++ b/app-emulation/qemu/files/qemu-binfmt.initd-r1
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/files/qemu-binfmt.initd-r1,v 1.2 2013/02/17 21:54:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/files/qemu-binfmt.initd-r1,v 1.3 2013/02/17 22:05:22 vapier Exp $
# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
@@ -13,23 +13,16 @@ start() {
ebegin "Registering qemu-user binaries"
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
- /sbin/modprobe binfmt_misc
+ modprobe -q binfmt_misc
fi
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
- eerror "You need \"binfmt_misc\" support in your kernel."
- eend 1
- return 1
+ eend $? "You need support for 'misc binaries' in your kernel!" || return
fi
if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1
- local result=$?
-
- if [ $result -ne 0 ] ; then
- eend $result
- return $result
- fi
+ eend $? || return
fi
# probe cpu type