From: Andrew Gaffney Date: Fri, 6 Mar 2009 13:32:32 +0000 (-0600) Subject: Modify append_data to die on 0 arguments and check arg 2 with isTrue(). Based on... X-Git-Tag: v3.4.10.904~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f446ceb0e9a4eae92cfc892746f3c0d1fc931833;p=genkernel.git Modify append_data to die on 0 arguments and check arg 2 with isTrue(). Based on a patch from robbat2 --- diff --git a/ChangeLog b/ChangeLog index 7dfc4f4..b0c11f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS) # Distributed under the GPL v2 + 06 Mar 2009; Andrew Gaffney gen_initramfs.sh: + Modify append_data to die on 0 arguments and check arg 2 with isTrue(). + Based on a patch from robbat2 + 20 Feb 2009; Andrew Gaffney arch/sparc64/config.sh, gen_compile.sh, gen_funcs.sh, gen_package.sh: Add support for multiple possible kernel binary paths for gentoo bug diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 40c6641..95fa971 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -561,7 +561,8 @@ append_data() { local name=$1 var=$2 local func="append_${name}" - if [ $# -eq 1 ] || [ ${var} -eq 1 ] + [ $# -eq 0 ] && gen_die "append_data() called with zero arguments" + if [ $# -eq 1 ] || isTrue ${var} then print_info 1 " >> Appending ${name} cpio data..." ${func}