Bug 193130

Summary: syntax error causes mkinitrd spewage
Product: [Fedora] Fedora Reporter: Nalin Dahyabhai <nalin>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: john.ellson, matthias, mtakahashi, reuben-redhatbugzilla, sangu.fedora
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.47 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-13 15:15:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
move dm stuff into its own function none

Description Nalin Dahyabhai 2006-05-25 15:25:14 UTC
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)

Comment 1 Karsten Hopp 2006-05-29 13:24:17 UTC
Created attachment 130189 [details]
move dm stuff into its own function

Comment 2 Reuben Farrelly 2006-05-31 08:32:07 UTC
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).


Comment 3 Matthias Saou 2006-06-21 13:15:18 UTC
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

Comment 4 Jeremy Katz 2006-06-21 15:36:07 UTC
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/

Comment 5 Karsten Hopp 2006-06-21 15:59:59 UTC
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'