Bug 137391 - /etc/rc.d/init.d/functions action() function invalid path /etc/rhgb/temp/rhgb-console
Summary: /etc/rc.d/init.d/functions action() function invalid path /etc/rhgb/temp/rhgb...
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts   
(Show other bugs)
Version: 3
Hardware: All Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
: 137427 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-10-28 00:30 UTC by Adam Jenkins
Modified: 2014-03-17 02:49 UTC (History)
2 users (show)

Fixed In Version: 7.93.2-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-28 02:28:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Adam Jenkins 2004-10-28 00:30:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
package is initscripts-7.86-1

Description of problem:
In /etc/rc.d/init.d/functions, line 438, in the action() function, is
where the error occurs, due to the script trying to write to an
invalid path when a step fails in the initscripts.  The code is part
of an if statement.  Here is the statement.

      if [ "$rc" = "0" ]; then
        echo_success > /etc/rhgb/temp/rhgb-console
        echo_failed > /etc/rhgb/tmp/rhgb-console
        [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes

Notice that the path being written to in the else block is different
from the path in the if block, but the should be the same.  The if
block is correct.  In the else block, "tmp" should be replaced with

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

How reproducible:

Steps to Reproduce:
1. You need to arrange for some initscript to fail for some reason
during bootup.  For example, if your computer is configured to
automatically bring up your ethernet connection using DHCP, then just
unplug your ethernet cable and boot.  When it runs the
/etc/init.d/network script, the ifup eth0 step will fail, and you'll
see an error message printed to your screen about an error at line 438
in /etc/rc.d/init.d/functions.

Additional info:

To fix the problem, simply substitute "temp" for "tmp" in the above
snippet.  Here's the correct code that should be in the action() function.

      if [ "$rc" = "0" ]; then
        echo_success > /etc/rhgb/temp/rhgb-console
        echo_failed > /etc/rhgb/temp/rhgb-console
        [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes

Comment 1 Bill Nottingham 2004-10-28 02:27:23 UTC
Fixed in 7.93.2-1, thanks!

Comment 2 Bill Nottingham 2004-10-28 14:22:35 UTC
*** Bug 137427 has been marked as a duplicate of this bug. ***

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