Bug 426570

Summary: mkinitrd shell syntax error
Product: [Fedora] Fedora Reporter: Pete Zaitcev <zaitcev>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dcantrell, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 6.0.27-2.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-09 04:52:10 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:

Description Pete Zaitcev 2007-12-22 08:47:54 UTC
Description of problem:

After building a kernel, it cannot be installed. The mkinitrd fails with
/sbin/mkinitrd: line 541: syntax error near unexpected token `done'
/sbin/mkinitrd: line 541: `    done'

Version-Release number of selected component (if applicable):

mkinitrd-6.0.22-1.fc9

How reproducible:

Always

Steps to Reproduce:
1. build a kernel
2. make modules_install
3. copy vmlinuz  (this may be optional)
4. run mkinitrd as usual:
mkinitrd /boot/initrd-foo.img foo
  
Actual results:

[root@simbelmyne linux-2.6.24-rc6-ub]# mkinitrd /boot/initrd-2.6.24-rc6-ub.img
2.6.24-rc6-ub
/sbin/mkinitrd: line 541: syntax error near unexpected token `done'
/sbin/mkinitrd: line 541: `    done'
[root@simbelmyne linux-2.6.24-rc6-ub]# 

Expected results:

mkinitrd working

Additional info:

rpm -V mkinitrd passes ok

Comment 1 Pete Zaitcev 2007-12-22 08:50:38 UTC
I replaced "if" with "elif" a few lines up in "elif [[ "$device" =~ ^dm- ]];
 then" and it seems to fix the issue.