Description of problem: mkinitrd spews when run in the kernel's %post with this error: /sbin/mkinitrd: line 740: break: only meaningful in a `for', `while', or `until' loop Don't know yet if it's still producing a useful initrd. Version-Release number of selected component (if applicable): 5.0.41-1 How reproducible: Always Steps to Reproduce: 1. mkinitrd -f /boot/initrd-2.6.16-1.2215_FC6.img 2.6.16-1.2215_FC6 Actual results: /sbin/mkinitrd: line 740: break: only meaningful in a `for', `while', or `until' loop Expected results: (nothing)
Created attachment 130189 [details] move dm stuff into its own function
Indeed, seeing that one here to and I get this also in 5.0.41-3: /sbin/mkinitrd: line 735: break: only meaningful in a `for', `while', or `until' loop /sbin/mkinitrd: line 740: break: only meaningful in a `for', `while', or `until' loop /proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. Command failed This is when building a non Redhat kernel (specifically, an -mm release).
Here's something similar from today (mkinitrd 5.0.42-1) : Updating : mkinitrd ##################### [ 21/139] Installing: kernel ##################### [ 22/139] /sbin/mkinitrd: line 840: break: only meaningful in a `for', `while', or `until' loop cp: cannot stat `/sbin/iscsistart': No such file or directory
This was fixed in 5.0.41-4, but the patches weren't committed to the main CVS repo. Done now for 5.0.43 and threw the binaries at http://people.redhat.com/~katzj/mkinitrd/
FYI: The bug isn't fixed in 5.0.43. It still has this code: if [ -n "$testdm" ]; then if [ ! -x /sbin/dmsetup -o ! -e /dev/mapper/control ]; then break; fi ... Note that there's no loop around this code. break just doesn't work with 'if'