Bug 144331
Summary: | mkinitrd fails with noclobber set in shell | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Joshua Buysse <buysse> | ||||
Component: | mkinitrd | Assignee: | Peter Jones <pjones> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3 | CC: | pakrat-rhat2 | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-03-23 22:22:59 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: | |||||||
Attachments: |
|
Description
Joshua Buysse
2005-01-06 02:02:42 UTC
I'll happily take a patch to fix this. Unless somebody provides one, I don't think it's worth the trouble to fix. Created attachment 111759 [details]
Patch to mkinitrd that does 'set +o noclobber'
Your patch fixes the symptoms without neccesarily fixing the root cause of the problem. 1) Are you really doing 'set -o noclobber' from the shell, or are you doing it from $BASH_ENV or something called by $BASH_ENV? If so, you can reasonably expect to clobber any /bin/bash script. 2) Is bash inheriting 'set -o noclobber'? Try this test script cat > /tmp/ts <<EEOOFF #!/bin/bash -x \echo BASH_ENV="'$BASH_ENV'" \set -o | /bin/grep clobber EEOOFF Try running 'set -o noclobber;/tmp/ts' and 'set +o noclobber;/tmp/ts'. If the script is inheriting the setting, double check to see if this is current correct behavior. If not, open the bug against 'bash'. If 'set -o noclobber' is being set by $BASH_ENV you should consider one of the following. 1) Use ~/.bashrc for interactive shells. 2) Use a case $- in; *i*) .... ;; esac construct to only set noclobber for interactive shells 3) Accept that your choice of $BASH_ENV over ~/.bashrc is going to skew behavior of bash scripts. Red Hat, I strongly recommend that you audit your #!/bin/bash scripts to see if they run correctly with the 'dash' posix shell. If so, change #!/bin/bash to #!/bin/sh t his will remove the possibility of $BASH_ENV overriding default behavior. If bashisms are present, re-evaluate whether or not they are appropriate to the task. Fixed in rawhide. |