Bug 447273

Summary: mkinitrd has some bash and system compatibility issues
Product: [Fedora] Fedora Reporter: Jiang Jiang <gzjjgod>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: dcantrell, wtogami
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-06 15:00:22 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:
Bug Depends On:    
Bug Blocks: 438944    
Attachments:
Description Flags
Patch to fix these issues
none
Updated patch
none
fix all =~ syntax instances none

Description Jiang Jiang 2008-05-19 08:37:12 UTC
Description of problem:
Lastest version of mkinitrd has some compatibility problems with older
distributions like RHEL 5.1 and CentOS 5.1.

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

6.0.52 (or clone from git.fedoraproject.org)

How reproducible:

Every time.

Steps to Reproduce:
1. Install mkinitrd-6.0.52 under RHEL 5.1/CentOS 5.1.
2. Run /sbin/mkinitrd
3.
  
Actual results:
# mkinitrd
usage: mkinitrd [--version] [--help] [-v] [-f] [--preload <module>]
       [--force-scsi-probe | --omit-scsi-modules]
       [--image-version] [--force-raid-probe | --omit-raid-modules]
       [--with=<module>] [--force-lvm-probe | --omit-lvm-modules]
       [--builtin=<module>] [--omit-dmraid] [--net-dev=<interface>]
       [--fstab=<fstab>] [--nocompress] <initrd-image> <kernel-version>

       (ex: mkinitrd /boot/initrd-2.2.5-15.img 2.2.5-15)

Expected results:
# mkinitrd
/sbin/mkinitrd: line 80: .: /etc/sysconfig/mkinitrd: is a directory
/sbin/mkinitrd: line 558: syntax error in conditional expression: unexpected
token `('
/sbin/mkinitrd: line 558: syntax error near `^(d'
/sbin/mkinitrd: line 558: `        if [[ "$device" =~ ^(dm-|mapper/) ]]; then'

Additional info:

Comment 1 Jiang Jiang 2008-05-19 08:37:12 UTC
Created attachment 305915 [details]
Patch to fix these issues

Comment 2 Jiang Jiang 2008-05-19 08:38:08 UTC
Oops, the "Actual results" and "Expected results" should be exchanged. My mistake.

Comment 3 Jiang Jiang 2008-05-19 09:58:58 UTC
Created attachment 305917 [details]
Updated patch

Comment 4 Corey Henderson 2008-06-11 20:30:48 UTC
Created attachment 308991 [details]
fix all =~ syntax instances

Yes, this is for the =~ syntax .. but your patch doesn't do all of them. This
attachment is a fix for all lines that have a =~ which don't quote both
arguments

Comment 5 John Poelstra 2008-10-07 05:31:38 UTC
Is this same issue present in rawhide or a maintained Fedora release?  We cannot collect RHEL or CentOS bugs under the "Fedora" product.

Comment 6 Warren Togami 2008-10-08 19:09:21 UTC
The suggested patches look safe and a good idea.  We should include this patch.

Comment 7 Bug Zapper 2008-11-26 02:17:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Jeremy Katz 2009-05-06 15:00:22 UTC
Newer verisons of mkinitrd aren't really intended to run on older RHEL releases.  As we're moving towards dracut in the future, this is even more going to be the case (as we'll be depending on new kernel + udev bits)