[Pkg-sysvinit-devel] Bug#743555: Bug#743555: initscripts: command "halt" unintended changed behaviour
Steve Langasek
vorlon at debian.org
Thu Apr 3 20:20:20 UTC 2014
Hi Hans,
On Thu, Apr 03, 2014 at 08:44:38PM +0200, Hans-J. Ullrich wrote:
> Package: initscripts
> Version: 2.88dsf-51
> Severity: minor
> I wondered, why the behaviour of the command halt might have changed.
> When I entered the command halt as root, my systems went down and then switched power off.
> Now it changed that way, that it is going down, but does not switch power off. There is a prompt "System halted".
> According to the manual halt -p does poweroff. This is working here, too.
> So far, so well halt is working as the manual says.
> But when I correct understand, then /etc/default/halt says, the command halt shall do a poweroff. And when I understand the manual correctly, the single command halt is calling the command "shutdown -h". If I am correct, then the command halt is buggy.
> If I am not correct, please enlighten me, and explain me, why the single command halt does no more poweroff, as it did before.
> Does this maybe be related to the change from sysinit to systemd?
> Please apologize, if this package is the wrong one, I reported the bug to.
I don't know why you are seeing a behavior change here in Debian, but this
is a FAQ in Ubuntu. You are right that for a very long time, the behavior
of 'halt' in sysvinit, as influenced by the contents of /etc/default/halt,
was to 'poweroff'. However, a careful reading of the documentation shows
that this was actually a *bug*; the 'halt' command, without arguments,
should always have been configured to do a non-poweroff halt, and
/etc/default/halt should only ever have affected the behavior of 'shutdown
-h'.
The standard behaviors should always have been:
shutdown -P == halt -p == poweroff: halt the system and power down
shutdown -H == halt: halt the system, do not power down
shutdown -h: halt or power off, depending on /etc/default/halt
The reason for this is that shutdown is effectively a wrapper around halt
and reboot (see /etc/init.d/reboot, /etc/init.d/halt), and if we allow
/etc/default/halt's HALT=poweroff setting to affect the behavior of not just
'shutdown -h', but also of 'halt', then there is *no way* to make 'shutdown
-H' do the right thing, because there is no way to override this and tell
halt to *not* poweroff (i.e., there is no option to halt which is the
opposite of '-p').
So the behavior you describe, while quite unfamiliar to many of us who got
quite used to the Debian behavior, is not actually buggy but a bugfix.
For information about the history of this behavior in Ubuntu (i.e., with
upstart), see:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/532366
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/880240
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/991997
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20140403/03002099/attachment.sig>
More information about the Pkg-sysvinit-devel
mailing list