Bug 193130 - syntax error causes mkinitrd spewage
syntax error causes mkinitrd spewage
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-25 11:25 EDT by Nalin Dahyabhai
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version: 5.0.47
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-13 11:15:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nalin Dahyabhai 2006-05-25 11:25:14 EDT
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 09:24:17 EDT
Created attachment 130189 [details]
move dm stuff into its own function
Comment 2 Reuben Farrelly 2006-05-31 04:32:07 EDT
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 09:15:18 EDT
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 11:36:07 EDT
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 11:59:59 EDT
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.