Bug#374039: #374039 shutdown -h -H: warn that then cannot poweroff perhaps

2019-04-11 Thread Adam Borowski
On Thu, Apr 11, 2019 at 10:42:38AM +, Dmitry Bogatov wrote:
> [2019-04-08 12:54] Jesse Smith 
> > On 4/8/19 12:38 PM, Dmitry Bogatov wrote:
> > > Maybe, but many of us are accustomed that /sbin/halt turns off the 
> > > computer,
> > > so here comes confusion.
> >
> > That is certainly true, but I'd like to point out that /sbin/halt only
> > turns off the computer because Debian modifies halt's behaviour. If you
> > run /sbin/halt without Debian's modifications, the traditional action
> > (stop without powering off) occurs. I'd almost consider this a bug since
> > /sbin/halt should be used to stop the system while /sbin/poweroff should
> > be used to, well, turn off the power to the system.

A computer being able to control its own power is a relatively new thing. 
Systems of old had only "halt", and without a separate command, it was
changed to power off once that functionality appeared in the hardware.  For
PCs, it was at the time of AT -> ATX.

> I believe at least in some of RPM-based distributions /sbin/halt also
> turns off computer. But it is just outdated memories from my studentship
> times :)

Your memory agrees with mine.  Making "halt" not turn off capable hardware
is a systemd change.

On one hand, it follows the name of these commands.  On the other, I can't
quite fathom the purpose of that infinite loop.  If someone for some weird
reason wanted the final hang, you can kexec that or something -- it's a
really odd case.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8"
⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs?
⠈⠳⣄



Bug#374039: #374039 shutdown -h -H: warn that then cannot poweroff perhaps

2019-04-11 Thread Dmitry Bogatov


control: tags -1 +fixed-upstream

[2019-04-08 12:54] Jesse Smith 
> On 4/8/19 12:38 PM, Dmitry Bogatov wrote:
> > control: tags -1 +upstream
> >
> > [ Please keep attribution ]
> >
> > [2019-04-07 11:12] Jesse Smith 
> >>
> >> That is what halt means - to stop running the system without powering
> >> off.
> > Maybe, but many of us are accustomed that /sbin/halt turns off the computer,
> > so here comes confusion.
>
> That is certainly true, but I'd like to point out that /sbin/halt only
> turns off the computer because Debian modifies halt's behaviour. If you
> run /sbin/halt without Debian's modifications, the traditional action
> (stop without powering off) occurs. I'd almost consider this a bug since
> /sbin/halt should be used to stop the system while /sbin/poweroff should
> be used to, well, turn off the power to the system.

I believe at least in some of RPM-based distributions /sbin/halt also
turns off computer. But it is just outdated memories from my studentship
times :)

> >> Halting is often used to run through the shutdown process and leave
> >> output on the screen for debugging purposes. Or when you want the OS to
> >> stop, but leave the power on. There is no negative side-effect to using
> >> the -H option, no loss of data. There isn't any reason to print an extra
> >> warning.
> > Okay, what about including this explanation into manpage? I know, Unix
> > is about sharp tools, but before I started working on sysvinit, I
> > believed, that "halt == turn-off", so extra explanation, that it is
> > different things would be nice to user.
>
> I'm in favour of this change and can expand on the explanation in the
> manual page for the next release.

Thank you!
-- 
Note, that I send and fetch email in batch, once every 24 hours.
 If matter is urgent, try https://t.me/kaction
 --



Bug#374039: #374039 shutdown -h -H: warn that then cannot poweroff perhaps

2019-04-08 Thread Jesse Smith
On 4/8/19 12:38 PM, Dmitry Bogatov wrote:
> control: tags -1 +upstream
>
> [ Please keep attribution ]
>
> [2019-04-07 11:12] Jesse Smith 
>>
>> That is what halt means - to stop running the system without powering
>> off.
> Maybe, but many of us are accustomed that /sbin/halt turns off the computer,
> so here comes confusion.

That is certainly true, but I'd like to point out that /sbin/halt only
turns off the computer because Debian modifies halt's behaviour. If you
run /sbin/halt without Debian's modifications, the traditional action
(stop without powering off) occurs. I'd almost consider this a bug since
/sbin/halt should be used to stop the system while /sbin/poweroff should
be used to, well, turn off the power to the system.


>> Halting is often used to run through the shutdown process and leave
>> output on the screen for debugging purposes. Or when you want the OS to
>> stop, but leave the power on. There is no negative side-effect to using
>> the -H option, no loss of data. There isn't any reason to print an extra
>> warning.
> Okay, what about including this explanation into manpage? I know, Unix
> is about sharp tools, but before I started working on sysvinit, I
> believed, that "halt == turn-off", so extra explanation, that it is
> different things would be nice to user.

I'm in favour of this change and can expand on the explanation in the
manual page for the next release.



Bug#374039: #374039 shutdown -h -H: warn that then cannot poweroff perhaps

2019-04-08 Thread Dmitry Bogatov


control: tags -1 +upstream

[ Please keep attribution ]

[2019-04-07 11:12] Jesse Smith 
> > Halt action is to halt or drop into boot monitor on systems that
> > support it." is not enough to convey, that in many cases it brings
> > machine into state, when it is still on, display still showing
> > letters, but no interation (except physical poweroff) is possible.
>
> That is what halt means - to stop running the system without powering
> off.

Maybe, but many of us are accustomed that /sbin/halt turns off the computer,
so here comes confusion.

> > "Maybe -H is actually produces useful behaviour in some cases (no
> > idea), but please add into manpage warning like "Do not use -H option,
> > unless you really know what are you doing."
>
> Halting is often used to run through the shutdown process and leave
> output on the screen for debugging purposes. Or when you want the OS to
> stop, but leave the power on. There is no negative side-effect to using
> the -H option, no loss of data. There isn't any reason to print an extra
> warning.

Okay, what about including this explanation into manpage? I know, Unix
is about sharp tools, but before I started working on sysvinit, I
believed, that "halt == turn-off", so extra explanation, that it is
different things would be nice to user.
-- 
Note, that I send and fetch email in batch, once every 24 hours.
 If matter is urgent, try https://t.me/kaction
 --



Bug#374039: #374039 shutdown -h -H: warn that then cannot poweroff perhaps

2019-04-07 Thread Jesse Smith
> Halt action is to halt or drop into boot monitor on systems that
> support it." is not enough to convey, that in many cases it brings
> machine into state, when it is still on, display still showing
> letters, but no interation (except physical poweroff) is possible.

That is what halt means - to stop running the system without powering off.

> "Maybe -H is actually produces useful behaviour in some cases (no
> idea), but please add into manpage warning like "Do not use -H option,
> unless you really know what are you doing."

Halting is often used to run through the shutdown process and leave
output on the screen for debugging purposes. Or when you want the OS to
stop, but leave the power on. There is no negative side-effect to using
the -H option, no loss of data. There isn't any reason to print an extra
warning.

Which brings me back to the original bug report which read: "Well, I
tried "-h -H", and guess what, it put my IBM Thinkpad in a unrebootable
state... no button would respond, no way to poweroff either. I had to
remove the AC cord, and remove the battery, to finally poweroff. So
perhaps add a warning to the man page."

The user could, in that case, just press and hold the power button for
five seconds to power off the machine. There is no need to remove the AC
power or take out the battery. Holding the power button works on all
workstations and laptops made in the past 20 years. It's common practise
for any time a machine hangs, has a kernel panic or stops responding to
keyboard input.