Bug 856967 - RFE: shabang /bin/sh
RFE: shabang /bin/sh
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Dave Young
Guangze Bai
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2012-09-13 05:05 EDT by Guangze Bai
Modified: 2015-02-08 16:38 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-10-30 10:15:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (409 bytes, patch)
2012-09-13 07:56 EDT, Guangze Bai
no flags Details | Diff

  None (edit)
Description Guangze Bai 2012-09-13 05:05:56 EDT
Description of problem:

Kdump allows to inject a shell script with kdump_pre or kdump_post, but the script shabang is restricted only to /bin/msh interpreter. Otherwise, if using the common writing /bin/sh, our script cannot get run properly.

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

How reproducible:

Steps to Reproduce:
1. prepare a simple script
# cat /bin/kdump-script
#!/bin/sh                 <-----
echo "$0: Hello World!"
echo "$0: crash"
echo "$0: lsmod"
echo "$0: Done!"
exit 0

2. add that in kdump.conf
kdump_pre /bin/kdump-script

3. start kdump and trigger a crash
Actual results:
From kdump kernel, it will output:
/bin/msh: option requires an argument -- c
BusyBox v1.2.0 (2012.07.17-15:34+0000) multi-call binary

No help available.

kdump_pre script exited with non-zero status

Expected results:
kdump-script get run successfully

Additional info:
Comment 2 Guangze Bai 2012-09-13 07:56:40 EDT
Created attachment 612419 [details]
proposed patch
Comment 5 Libor Miksik 2012-10-25 08:31:29 EDT
Thank you for submitting this issue for consideration. Red Hat Enterprise Linux 5 has reached the end of Production 1 Phase of its Life Cycle.  Red Hat does not plan to incorporate the suggested capability in a future Red Hat Enterprise Linux 5 minor release. If you would like Red  Hat to re-consider this feature request and the requested functionality is not currently in Red Hat Enterprise Linux 6, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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