diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-02-17 22:05:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-02-17 22:05:22 +0000 |
commit | 7ebe62807cd33a27008c95c85f6ae5f49010f903 (patch) | |
tree | 00e9f5ea624754db57323b7a07cd93b1aa3acd37 /app-emulation | |
parent | version bump (diff) | |
download | gentoo-2-7ebe62807cd33a27008c95c85f6ae5f49010f903.tar.gz gentoo-2-7ebe62807cd33a27008c95c85f6ae5f49010f903.tar.bz2 gentoo-2-7ebe62807cd33a27008c95c85f6ae5f49010f903.zip |
Simplify initial checks.
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu/ChangeLog | 6 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-binfmt.initd | 11 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-binfmt.initd-r1 | 15 |
3 files changed, 12 insertions, 20 deletions
diff --git a/app-emulation/qemu/ChangeLog b/app-emulation/qemu/ChangeLog index be267b552159..16836ccddb57 100644 --- a/app-emulation/qemu/ChangeLog +++ b/app-emulation/qemu/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-emulation/qemu # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.185 2013/02/17 21:54:51 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.186 2013/02/17 22:05:22 vapier Exp $ + + 17 Feb 2013; Mike Frysinger <vapier@gentoo.org> files/qemu-binfmt.initd, + files/qemu-binfmt.initd-r1: + Simplify initial checks. 17 Feb 2013; Mike Frysinger <vapier@gentoo.org> files/qemu-binfmt.initd, files/qemu-binfmt.initd-r1: diff --git a/app-emulation/qemu/files/qemu-binfmt.initd b/app-emulation/qemu/files/qemu-binfmt.initd index 7faef2733aa9..b8824bc0288f 100644 --- a/app-emulation/qemu/files/qemu-binfmt.initd +++ b/app-emulation/qemu/files/qemu-binfmt.initd @@ -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,v 1.2 2013/02/17 21:54:51 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/files/qemu-binfmt.initd,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,17 +13,12 @@ start() { ebegin "Registering qemu-user binaries" if [ ! -d /proc/sys/fs/binfmt_misc ] ; then - eerror "You need support for \"misc binaries\" in your kernel!" - eend 1 + eend $? "You need support for 'misc binaries' in your kernel!" || return fi if [ $(mount | grep -c binfmt_misc) -eq 0 ] ; 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 - fi + eend $? || return fi # probe cpu type 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 |