Bug 447273 - mkinitrd has some bash and system compatibility issues
mkinitrd has some bash and system compatibility issues
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: F10Target
  Show dependency treegraph
 
Reported: 2008-05-19 04:37 EDT by Jiang Jiang
Modified: 2009-05-06 11:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-06 11:00:22 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)
Patch to fix these issues (1.06 KB, patch)
2008-05-19 04:37 EDT, Jiang Jiang
no flags Details | Diff
Updated patch (1.91 KB, patch)
2008-05-19 05:58 EDT, Jiang Jiang
no flags Details | Diff
fix all =~ syntax instances (2.55 KB, patch)
2008-06-11 16:30 EDT, Corey Henderson
no flags Details | Diff

  None (edit)
Description Jiang Jiang 2008-05-19 04:37:12 EDT
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 04:37:12 EDT
Created attachment 305915 [details]
Patch to fix these issues
Comment 2 Jiang Jiang 2008-05-19 04:38:08 EDT
Oops, the "Actual results" and "Expected results" should be exchanged. My mistake.
Comment 3 Jiang Jiang 2008-05-19 05:58:58 EDT
Created attachment 305917 [details]
Updated patch
Comment 4 Corey Henderson 2008-06-11 16:30:48 EDT
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 01:31:38 EDT
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 15:09:21 EDT
The suggested patches look safe and a good idea.  We should include this patch.
Comment 7 Bug Zapper 2008-11-25 21:17:28 EST
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 11:00:22 EDT
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.