Rearrange checks so the return value is read correctly.
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 11 Mar 2008 05:59:13 +0000 (05:59 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 11 Mar 2008 05:59:13 +0000 (05:59 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@615 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
generic/initrd.scripts

index 662c6bfdf526d9cdb39c147ac0bb8ffb5f064a15..5fafeea9f7264a61c21568ec12304df3e870809e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  11 Mar 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  generic/initrd.scripts:
+  Rearrange checks so the return value is read correctly.
+
   10 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> alpha/busy-config,
   gen_initrd.sh, generic/initrd.scripts, generic/linuxrc, ia64/busy-config,
   mips/busy-config, parisc/busy-config, parisc64/busy-config,
index 52dee17a0063f7562576c094c5fe4e207c856cdb..709aa0372376021739d642f67d006e78f57b33ea 100644 (file)
@@ -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