Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 339789

Summary: sys-kernel/genkernel-3.4.10.907, arithmetic bug in /usr/share/genkernel/defaults/initrd.scripts
Product: Gentoo Linux Reporter: Kolbjørn Barmen <gentoo>
Component: Current packagesAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal CC: sping
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 351772    

Description Kolbjørn Barmen 2010-10-05 08:32:08 UTC
Line 570 in /usr/share/genkernel/defaults/initrd.scripts says:

        if [ "${USE_MDADM}" -eq '1' ]

this should be

        if [ "${USE_MDADM}" = '1' ]

as "${USE_MDADM}" might be an empty string, and then -eq will fail.

There are other simliar checks in the same script, and they all use = instead of -eq.

Reproducible: Always
Comment 1 Sebastian Pipping gentoo-dev 2011-01-11 13:35:12 UTC
Excellent catch, thanks for reporting.

This has been fixed on the experimental branch exposed by genkernel-99999 (five nines).

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=532dd7a3871e389351d115fb19db73532bb6dd5b