Bug 193130 - syntax error causes mkinitrd spewage
Summary: syntax error causes mkinitrd spewage
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-25 15:25 UTC by Nalin Dahyabhai
Modified: 2007-11-30 22:11 UTC (History)
5 users (show)

Fixed In Version: 5.0.47
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-13 15:15:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
move dm stuff into its own function (4.69 KB, patch)
2006-05-29 13:24 UTC, Karsten Hopp
no flags Details | Diff

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'


Note You need to log in before you can comment on or make changes to this bug.