Bug 1270629 - Bad cmdline parsing in 50-dracut.install and 51-dracut-rescue.install
Bad cmdline parsing in 50-dracut.install and 51-dracut-rescue.install
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint-list
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-11 21:21 EDT by Michael Chapman
Modified: 2016-07-19 14:11 EDT (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Michael Chapman 2015-10-11 21:21:46 EDT
This bug is in dracut-041-14.fc22.x86_64.

50-dracut.install and 51-dracut-rescue.install use the shell "read" builtin incorrectly. This causes /bin/kernel-install to exit unsuccessfully, leading to RPM scriptlet failures when a kernel-core package is installed or updated.

The problem is on these lines:

  50-dracut.install
  28:            read -ar BOOT_OPTIONS < /proc/cmdline

  51-dracut-rescue.install
  48:    read -ar BOOT_OPTIONS < /proc/cmdline

"read -a" requires the array name to immediately follow. These lines aren't reading into the $BOOT_OPTIONS array; instead they're populating an array named $r. A subsequent test for $BOOT_OPTIONS being empty causes the *.install scripts to exit with failure.

This bug has been fixed upstream:

  commit a6018700645a037e629d64ade52bb93bb7fb70ae
  Author: Harald Hoyer <harald@redhat.com>
  Date:   Wed May 13 11:49:05 2015 +0200

      5?-dracut*.install: better parsing of /proc/cmdline
    
      "read -r -d '' -a" does, what we want.

It would be nice to have this commit backported to the dracut in Fedora.
Comment 1 Michael Chapman 2016-03-22 19:37:38 EDT
This is still a bug as of dracut-041-15.fc22.x86_64.
Comment 2 Fedora End Of Life 2016-07-19 14:11:01 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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