Bug 447273 - mkinitrd has some bash and system compatibility issues
Summary: mkinitrd has some bash and system compatibility issues
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: 10
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F10Target
TreeView+ depends on / blocked
Reported: 2008-05-19 08:37 UTC by Jiang Jiang
Modified: 2009-05-06 15:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-05-06 15:00:22 UTC

Attachments (Terms of Use)
Patch to fix these issues (1.06 KB, patch)
2008-05-19 08:37 UTC, Jiang Jiang
no flags Details | Diff
Updated patch (1.91 KB, patch)
2008-05-19 09:58 UTC, Jiang Jiang
no flags Details | Diff
fix all =~ syntax instances (2.55 KB, patch)
2008-06-11 20:30 UTC, Corey Henderson
no flags Details | Diff

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
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

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:

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)

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