This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 137391 - /etc/rc.d/init.d/functions action() function invalid path /etc/rhgb/temp/rhgb-console
/etc/rc.d/init.d/functions action() function invalid path /etc/rhgb/temp/rhgb...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 137427 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-27 20:30 EDT by Adam Jenkins
Modified: 2014-03-16 22:49 EDT (History)
2 users (show)

See Also:
Fixed In Version: 7.93.2-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-27 22:28:08 EDT
Type: ---
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 Adam Jenkins 2004-10-27 20:30:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040929
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
      else
        echo_failed > /etc/rhgb/tmp/rhgb-console
        [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes
      fi

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
"temp".

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

How reproducible:
Always

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
      else
        echo_failed > /etc/rhgb/temp/rhgb-console
        [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes
      fi
Comment 1 Bill Nottingham 2004-10-27 22:27:23 EDT
Fixed in 7.93.2-1, thanks!
Comment 2 Bill Nottingham 2004-10-28 10:22:35 EDT
*** 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.