Bug 494861 - Syntax error from /etc/rc.d/init.d/halt
Syntax error from /etc/rc.d/init.d/halt
Status: CLOSED DUPLICATE of bug 480799
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-08 08:41 EDT by Mary Ellen Foster
Modified: 2014-03-16 23:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-09 05:20:49 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 Mary Ellen Foster 2009-04-08 08:41:09 EDT
Description of problem:
Whenever I shut down or reboot my computer, I now get a warning regarding line 178 of /etc/rc.d/rc0.d/S01halt or /etc/rc.d/rc6.d/S01reboot (which are both /etc/rc.d/init.d/halt) saying that there is a missing "]" character. The line in question doesn't actually look suspicious ...

Rebooting still works (i.e., the computer restarts after the error), but shutting down now just prints "system halted" but does not actually turn off the machine.


Version-Release number of selected component (if applicable):
initscripts-8.86.2-1.i386


How reproducible:
Every time, on two different computers
Comment 1 Bill Nottingham 2009-04-08 10:46:26 EDT
Please try 8.86.3-1.
Comment 2 James Ralston 2009-04-08 11:11:18 EDT
Mary, the problem is that line 178 has a syntax error.  Specifically, this:

[ "$INIT_HALT" != "HALT"] && HALTARGS="$HALTARGS -p"

Must be this:

[ "$INIT_HALT" != "HALT" ] && HALTARGS="$HALTARGS -p"

The space is required for the shell to treat '"HALT"' and ']' as two separate lexical tokens, instead of a single token '"HALT"]'.
Comment 3 Mary Ellen Foster 2009-04-09 05:20:49 EDT

*** This bug has been marked as a duplicate of bug 480799 ***

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