[systemd-devel] [PATCH] systemctl: introduce -e and -d for start and stop

Jan Synacek jsynacek at redhat.com
Thu May 14 00:49:07 PDT 2015

Lennart Poettering <lennart at poettering.net> writes:

> On Wed, 13.05.15 15:21, jsynacek at redhat.com (jsynacek at redhat.com) wrote:
>> From: Jan Synacek <jsynacek at redhat.com>
> Hmm, do we really need two options for this? I mean, since -e would
> only ever be combined with start, and -d only with stop it could as
> well be a single option that works for both?

Makes sense. I actually wanted to implement the one argument version
first, but then decided to make it more explicit. Will fix.

> Also, I am tempted to say that this should be reversed: instead of
> making this options that alter start/stop behaviour, it should be
> options that alter enable/disable behaviour, and actually take into
> account the precise units that were enabled, including everything
> referenced in the [Install] section of the unit files.
> hence, I think I would prefer something like this instead:
>        systemctl enable --now foobar.service
>        systemctl disable --now foobar.service
> Where "--now" simply means that the service shall be started after
> enabling, and stopped after disabling. 
> Does this make sense?

Yes, it does. I'll rewrite the patch.

Jan Synacek
Software Engineer, Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150514/56fefdbc/attachment.sig>

More information about the systemd-devel mailing list