[systemd-devel] Unexpected behaviour not noticed by systemctl command
Lennart Poettering
lennart at poettering.net
Thu Oct 31 16:40:58 UTC 2019
On Mo, 07.10.19 11:43, Andy Pieters (systemd at andypieters.me.uk) wrote:
> Hi guys
>
> Just lately ran into a fumble. I was trying to stop and disable a
> service and I typed in:
>
> systemctl stop --now example.service
>
> The service duly stopped but wasn't disabled because the --now switch
> is only applicable on the disable/enable/mask commands
>
> However, shouldn't it be good practice to produce a warning or an
> error when a switch is used that has no effect?
We consider most swicthes "modifiers" that just modify behaviour
slightly but not generally, and hence if they don't apply we simply
ignore them. Maybe the "--now" switch is a bit mroe heavy weight than
the others, and we should refuse it. Can you maybe file a github issue
about this (maybe even prep a PR), and we'll look into it.
> Do you think it would be worth me writing a bug report for it?
Yes!
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list