https://qa.mandrakesoft.com/show_bug.cgi?id=633
Product: initscripts
Component: initscripts
Summary: Mistake in /etc/init.d/halt script
Version: 6.91-16mdk
Platform: PC
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: P2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
The bug is these lines of /etc/init.d/halt, right near the end of the script:
HALTARGS="-i -d -p"
[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"
The problem is that all the second line can do is add a second "-p" to
HALTARGS, which is useless. HALTARGS is a string of option arguments
to either the "halt" or "reboot" command, either of which treat two
"-p" arguments exactly the same as one. That means that the second
line does absolutely nothing useful.
Either the two lines should be replaced with
HALTARGS="-i -d -p"
or
HALTARGS="-i -d"
[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"
In the latter case, the "-p" option will be added if either the file
/poweroff is present or the file /halt is absent. If the file /halt
exists, the "-p" is not added, so the machine halts without powering
down (which can be a useful workaround if powering off causes a kernel
panic instead of shutting down the machine).
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.