From: Chris Gianelloni Date: Tue, 11 Mar 2008 05:59:13 +0000 (+0000) Subject: Rearrange checks so the return value is read correctly. X-Git-Tag: v3.4.10.902~137 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7a57d783086bc85aa38d570539de2e71298f280;p=genkernel.git Rearrange checks so the return value is read correctly. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@615 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/ChangeLog b/ChangeLog index 662c6bf..5fafeea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 11 Mar 2008; Chris Gianelloni + generic/initrd.scripts: + Rearrange checks so the return value is read correctly. + 10 Mar 2008; Andrew Gaffney alpha/busy-config, gen_initrd.sh, generic/initrd.scripts, generic/linuxrc, ia64/busy-config, mips/busy-config, parisc/busy-config, parisc64/busy-config, diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 52dee17..709aa03 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -281,11 +281,11 @@ runmdev() { } test_success() { - error_string=$1 - error_string="${error_string:-run command}" # If last command failed send error message and fall back to a shell if [ "$?" != '0' ] then + error_string=$1 + error_string="${error_string:-run command}" bad_msg 'Failed to $1; failing back to the shell...' run_shell fi