Red Hat Bugzilla – Bug 494861
Syntax error from /etc/rc.d/init.d/halt
Last modified: 2014-03-16 23:18:18 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):
Every time, on two different computers
Please try 8.86.3-1.
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"]'.
*** This bug has been marked as a duplicate of bug 480799 ***