[systemd-devel] [PATCH v2] systemctl: introduce --now for enable, disable and mask

Lennart Poettering lennart at poettering.net
Fri May 15 02:51:23 PDT 2015


On Fri, 15.05.15 08:58, J├│hann B. Gu├░mundsson (johannbg at gmail.com) wrote:

> 
> 
> On 05/15/2015 07:54 AM, jsynacek at redhat.com wrote:
> >From: Jan Synacek <jsynacek at redhat.com>
> >
> >---
> >changes in v2:
> >* simplified creation of new arguments (replaced unnecessary dynamic allocation
> >   with a VLA)
> >* renamed add_file_change to unit_file_add_changes
> >* addressed wording issues in documentation
> >
> 
> Hmm is the usecase for this to spare administrator having to type twice the
> systemctl command on the console as in systemctl start $foo && systemctl
> enable $foo becomes "systemctl start --now $foo"

No, it becomes "systemctl enable --now $foo".

> If that's the case would it not be better to simply support "systemctl start
> enable $foo" rather then introducing yet another switch for administrators
> to remember?

Well, first of all, he doesn't have to remember, he can still do this
in two steps manually. 

But more importantly, so far all our verbs are single words, and
everything that comes after them are arguments to the verbs. THis
makes things nicely uniform, not only for the admin to grok, but also
for code to parse (and not just inside of systemctl, but also in the
shell completion logic and suchlike). 

But anyway, this is certainly a matter of taste... 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list