Skip to content

Add support for poweroff time, or at least not error out on "now" #494

@xqrs

Description

@xqrs

We do not usually accept feature requests, please see the README. You may open a feature request
if you are a distribution/package maintainer and have a clear need for the feature, or if you are
willing to develop the feature yourself and would like to discuss it first.

It shouldn't be hard, I can hack around with C if you want.

Your background
A developer of a script that uses kexec.

The problem
kexec depends on the command: shutdown -r now to reboot the system, NOW!
But dinit's shutdown command does not support now as an argument so it errors out instead of rebooting.
Actually dinit's shutdown command does not support any timing at all, it just does it NOW!

The solution
Add in the shutdown command source code: if you found a stray "now" argument, just ignore it.

Additional context
See: https://github.com/horms/kexec-tools/blob/daa29443819d3045338792b5ba950ed90e79d7a5/kexec/kexec.c#L937

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions