Public bug reported:

Package: sysvinit-2.86.ds1-14.1ubuntu18

Short: in "/sbin/halt", the "-i" switch fails.

Long: Please read through Debian bug #405870:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405870

Please also see Ubuntu bug #71418.

This following will describe "why 'halt' matters", but has nothing to do
with the fact that "halt -i" is broken in "Ubuntu sysvinit", except to
say that the version of "halt" from a source compile works correctly.

Because many network drivers fail to correctly manage the "wake on lan"
(WOL) setting under all "start-up" and "shut-down" circumstances, for
the WOL feature to function on the hardware, some network drivers need
the network interface "down" when the computer system is halted - the
3c59x driver, for instance - while other drivers need the network
interface to be "up" when the computer system is halted.

This situation with the network drivers is unfortunate.  Many bug
reports could be filed regarding the failure of various network drivers
to properly set the "WOL" bits at system "shut-down" under varying
circumstances.  Nonetheless, "halt -i" should be fixed first.

In Debian bug #405870, Harry Coin says "Compiling 'halt' from the
sysvinit sources results in a binary larger than the one in etch, and it
works properly.", but does not say exactly _which_ "sources".  I suppose
he means simply the original Debian sources.

I have confirmed that "halt" compiled from the Ubuntu source archive,
using "apt-get source sysvinit", does work correctly.  The version of
"halt" distributed in the Ubuntu binary package,
sysvinit-2.86.ds1-14.1ubuntu18, does NOT work correctly.

To check "halt", try "ifconfig; sudo halt -f -i -w; ifconfig".  Note
whether or not the active interface goes "down" and disappears from the
"ifconfig" output.

A quick workaround, instead of compiling "halt" from source, and prior
to an upgrade to "sysvinit": add this line to "/etc/init.d/halt", in the
"do_stop" function, just before the line "halt -d -f -i $poweroff
$hddown":

 ifdown --force -a

if your driver needs the interface to be "down" to properly set the
"WOL" bits.

If your driver needs the interface to be "up" to properly set the "WOL"
bits, of course, also remove the "-i" switch from the following "halt"
command, for when "halt" gets fixed.

And of course, for anybody who suddenly looses "WOL" when the "sysvinit"
package is upgraded with a working "halt", they will need to modify
"/etc/init.d/halt", or modify "/etc/defaults/halt" if someone is polite
enough to include Harry Coin's "NETDOWN" option in "/etc/defaults/halt"
and in "/etc/init.d/halt".  There should be a note about this added in
the upgrade.

Some further notes for anyone having WOL problems:
After enabling the "WOL" feature in the system BIOS, some network drivers also 
require additional configuration using, perhaps individually, or perhaps in 
some combination:
 /etc/modprobe.d/options
a line like
 options 3c59x enable_wol=1
or
 sudo ethtool eth0
and
 sudo ethtool -s wol g eth0
and/or
 acpitool -w
and
 sudo acpitool -W <some number>

Tedious and confusing, eh?  Trial and error may help.  All this is in
addition to trying "shutdown" with the interface "up" and "shutdown"
with the interface "down".

Also, some network hardware will completely loose the WOL setting if the
system looses power.  And some systems will fail to properly set the WOL
bits when the system is first plugged in, no matter what is set in the
BIOS.  Ah well...

James

** Affects: sysvinit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
halt binary missing ifdown, breaks wake on lan, src compile works
https://bugs.launchpad.net/bugs/127010
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to