[Pkg-sysvinit-devel] Bug#586709: Think I found the problem
KatolaZ
katolaz at freaknet.org
Thu Oct 25 08:53:24 BST 2018
On Wed, Oct 24, 2018 at 10:16:16PM -0300, Jesse Smith wrote:
[cut]
>
> 1. Running plain "halt" results in "halt" being called and we get the
> correct behaviour. The system stops, but does not power off.
>
> 2. Running "halt -p" results in "halt" being called as just "halt". The
> user's special "-p" flag is not appended to the command. The halt
> command stops the system, but does not power off.
>
> I believe the solution here is to update /etc/init.d/halt and have it
> call the "halt" command with any parameters the user specifies, appended
> to the command line. Otherwise it only reads the default value and
> ignores command line parameters.
>
> I manually modified my copy of the script to put "-p" on the end of
> "halt", regardless of the default, and it correctly shutdown the system
> and powered off. So the issue here seems to be the script not passing
> user parameters rather than an issue with the halt.c code.
>
> Though I'm open to ways we can better manage parameters to make
> writing/updating the halt init.d script easier.
>
Dear Jesse,
thanks a lot for the analysis. It looks like we could also add a
parameter "OPTIONS" to /etc/default/halt, which is a string of
arguments to be verbatim passed to either halt or poweroff? This is
actually done by other packages which make use of a conf file in
/etc/default.
We could also have separated HALT_OPTIONS and POWEROFF_OPTIONS, to
make it more clear to the admin, and set appropriate defaults for the
two cases.
Comments are welcome.
KatolaZ
--
[ ~.,_ Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab ]
[ "+. katolaz [at] freaknet.org --- katolaz [at] yahoo.it ]
[ @) http://kalos.mine.nu --- Devuan GNU + Linux User ]
[ @@) http://maths.qmul.ac.uk/~vnicosia -- GPG: 0B5F062F ]
[ (@@@) Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-sysvinit-devel/attachments/20181025/00b31fe5/attachment.sig>
More information about the Pkg-sysvinit-devel
mailing list