[Pkg-sysvinit-devel] Bug#743555: Bug#743555: initscripts: command "halt" unintended changed behaviour
Hans-J. Ullrich
hans.ullrich at loop.de
Fri Apr 4 08:15:09 UTC 2014
Am Donnerstag, 3. April 2014, 13:20:20 schrieb Steve Langasek:
> Hi Hans,
Hi Steve,
thank you very much for your explanations. As you wrote, I already thought of
it, that the now correct behaviour is a bugfix of the wrong behaviour before.
But I had no proove of it. Thanks to you, I have now. :)
So I will just shutdown with shutdown -h now or halt -p instead of halt as
before.
Just as required.
Now as I know the background, you can safely close the bugreport.
Again, thanks very much for the quick response and the very value information,
Best
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
More information about the Pkg-sysvinit-devel
mailing list