Bug 450946
| Summary: | RFE: Comment to be added to "daemon" function | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | David Tonhofer <bughunt> | ||||
| Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | Brock Organ <borgan> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 5.2 | CC: | notting | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2009-03-20 15:17:01 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
David Tonhofer
2008-06-11 20:40:10 UTC
Well, the first two sentences are just wrong - there's no specific environment cleaning done, and it's not run through initlog in RHEL 5. Created attachment 309141 [details]
A simple shell script; creates files in /tmp
Running this will create a script in /tmp to be run through "daemon". "daemon"
is then called, calling the script in /tmp, which writes a result, also to
/tmp. That result is then "catted"
Yes, you are right, this is shite. It applies to RHES4, not RHES5, as the
scripts changed. I have not checked behaviour on RHES5.
-------- On RHES5:
# And start it up.
if [ -z "$user" ]; then
$nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*"
else
$nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*"
fi
-------- On RHES4:
# And start it up.
if [ -z "$user" ]; then
$nice initlog $INITLOG_ARGS -c "$*"
else
$nice initlog $INITLOG_ARGS -c "runuser -s /bin/bash - $user -c \"$*\""
fi
-----------------
So let's discuss RHES4. Product should be changed to RHES4 - so maybe the
problem is moot.
There indeed is no specific environment cleaning done. Still, the program called
through daemon() does not "see" any of envvariables set in the rc.d script (a
good thing, probably) - so you have to pass parameters instead. However,
daemon() does not take kindly to those, thus the rather complex quoting -- the
only one I got to work. But even so, daemon() will spit out an error in this line:
# See if it's already running. Look *only* at the pid file.
if [ -f /var/run/${base}.pid ]; then
as "base" is not a program name only but the program name with its parameters.
See the little attached script.
I believe this is fixed in RHEL 5, with the move away from initlog. Red Hat does not currently plan to provide a resolution for this in a Red hat Enterprise Linux 4 update for currently deployed systems. With the goal of minimizing risk of change for deployed systems, and in response to customer and partner requirements, Red Hat takes a conservative approach when evaluating changes for inclusion in maintenance updates for currently deployed products. The primary objectives of update releases are to enable new hardware platform support and to resolve critical defects. |