Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-22 Thread Michael Biebl
Am 22.11.2017 um 09:09 schrieb Thomas L:
> Thank you for your answer.
> 
>> I don't see a -t parameter there. It looks like -t is a legacy command
>> line option which systemctl parses but ignores:
> 
> Ok. However:
> * systemctl does not correctly parse (and ignore) the -t option, because this 
> option
>is followed by a number that should be skipped as well. Either -t is an 
> unknown option
>and shutdown should print an error message, or it is kept for 
> compatibility reason
>and ignored and in this case it should be correctly parsed.
> * I was misled by the french manpage of shutdown that still documents the 
> "-t" option.
>This localized manpage should be updated.
> 
> Anyway, from my point of view it's a regression (on Jessie at least): my 
> "shutdown -h -t 5 now" command
> was working (even if "-t 5" was ignored), and now it's not
> (i.e. the shutdown does not occur at the correct hour).

I'm not saying that it's not a bug. Sorry if this was unclear.

Just in case you missed it, I've forwarded this upstream:

https://github.com/systemd/systemd/issues/7413


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-22 Thread Thomas L
Thank you for your answer.

>I don't see a -t parameter there. It looks like -t is a legacy command
>line option which systemctl parses but ignores:

Ok. However:
* systemctl does not correctly parse (and ignore) the -t option, because this 
option
   is followed by a number that should be skipped as well. Either -t is an 
unknown option
   and shutdown should print an error message, or it is kept for compatibility 
reason
   and ignored and in this case it should be correctly parsed.
* I was misled by the french manpage of shutdown that still documents the "-t" 
option.
   This localized manpage should be updated.

Anyway, from my point of view it's a regression (on Jessie at least): my 
"shutdown -h -t 5 now" command
was working (even if "-t 5" was ignored), and now it's not
(i.e. the shutdown does not occur at the correct hour).

Regards,
Thomas


Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-21 Thread Michael Biebl
Am 20.11.2017 um 18:07 schrieb Thomas L:
>  Try to reboot the computer with:
>  # shutdown -h -t 5 now


Looking at shutdown --help (v232), I get


> # shutdown --help
> shutdown [OPTIONS...] [TIME] [WALL...]
> 
> Shut down the system.
> 
>  --help  Show this help
>   -H --halt  Halt the machine
>   -P --poweroff  Power-off the machine
>   -r --rebootReboot the machine
>   -h Equivalent to --poweroff, overridden by --halt
>   -k Don't halt/power-off/reboot, just send warnings
>  --no-wall   Don't send wall message before halt/power-off/reboot
>   -c Cancel a pending shutdown


I don't see a -t parameter there. It looks like -t is a legacy command
line option which systemctl parses but ignores:

https://github.com/systemd/systemd/blob/master/src/systemctl/systemctl.c#L8126



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-21 Thread Thomas L
I made a diff between systemd-sysv 215-17+deb8u5 (bug not present)
and 215-17+deb8u7 (bug present), and there are 2 new patches
(introduced in version 215-17+deb8u6) that may be related to this bug:

* systemctl-fix-argument-handling-when-invoked-as-shutdown.patch
* systemctl-when-reading-legacy-t-argument-for-shutdown-don.patch



Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-20 Thread Thomas L
Hi Michael,

I can reproduce this bug on Strech as well (systemd-sysv 232-25+deb9u1).

I think you should however also fix this bug on Jessie, because it is a recent 
regression (was not present on Jessie 8.6). Based on the package's recent 
changelog, it may be a regression of "systemctl: Fix argument handling when 
invoked as shutdown. (Closes: #776997)" introduced on 215-17+deb8u6 (it's just 
a guess, but it is the only recent fix on shutdown's argument handling).

Regards
Thomas


Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-20 Thread Michael Biebl
Hello Thomas

Am 20.11.2017 um 18:07 schrieb Thomas L:
> Package: systemd-sysv
> Version: 215-17+deb8u7
> Severity: normal
> 
> Dear Maintainer,
> 
> *** Reporter, please consider answering these questions, where appropriate ***
> 
>* What led up to the situation?
>  Try to reboot the computer with:
>  # shutdown -h -t 5 now
>* What was the outcome of this action?
>  A shutdown is planned in 5mn, and "now" seems to be interpreted as the
> message to send to users.
>* What outcome did you expect instead?
>  Shutdown should start immediatly, with a 5s delay before sending the kill
> signal.
> 
> This problem was not present in Debian 8.6. I detected this problem in Debian
> 8.9 (but it may have appeared somewhere between 8.6 and 8.9).
> 

Please test with a non-ancient version (like v232 from stretch) and
report back with the results. Jessie will only get security critical
fixes which this one is not.

Regards,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#882245: systemd-sysv: shutdown does not parse correctly -t option

2017-11-20 Thread Thomas L
Package: systemd-sysv
Version: 215-17+deb8u7
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
 Try to reboot the computer with:
 # shutdown -h -t 5 now
   * What was the outcome of this action?
 A shutdown is planned in 5mn, and "now" seems to be interpreted as the
message to send to users.
   * What outcome did you expect instead?
 Shutdown should start immediatly, with a 5s delay before sending the kill
signal.

This problem was not present in Debian 8.6. I detected this problem in Debian
8.9 (but it may have appeared somewhere between 8.6 and 8.9).



-- System Information:
Debian Release: 8.9
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd-sysv depends on:
ii  systemd  215-17+deb8u7

systemd-sysv recommends no packages.

systemd-sysv suggests no packages.