[systemd-devel] [PATCH] systemctl: resolve duplicate -f option in doc

Dave Reisner d at falconindy.com
Mon Mar 26 15:24:21 PDT 2012


On Tue, Mar 27, 2012 at 12:01:52AM +0200, Lennart Poettering wrote:
> On Mon, 26.03.12 23:58, Lennart Poettering (lennart at poettering.net) wrote:
> 
> > On Sun, 18.03.12 20:28, Dave Reisner (d at falconindy.com) wrote:
> > 
> > Heya,
> > 
> > > The man page listed -f as the shortopt for both --follow and --force,
> > > but the shortopt only applied to --force. Since --force is the dangerous
> > > option, take away the shortopt and give it to --follow. Users should be
> > > reminded that what they're about to do isn't standard procedure.
> > 
> > Hmm, so I change this the other way round, so that -f is short for
> > --force, not for --follow.
> > 
> > This main reason is simply that -f as --force was already that way a
> > long time ago and we included the systemctl interface in our interface
> > stability promise.
> > 
> > Besides at least I myself while debugging systemd quite often have to
> > type "systemctl reboot -ff", but that'd be much hrder with "systemctl
> > reboot --force --force"...
> 
> Hmm thinking about it, it might actually make sense that -f really is
> short for both --force and --follow. Given that no command uses both in
> conjunction anyway this should be fairly safe I think.
> 
> That way --force or -f would enable force mode for "systemctl enable",
> "systemctl reboot". And --follow or -f would enable follow mode for
> "systemctl status".
> 
> Opinions? Is this kind of overloading ugly? I am tempted to say it's
> pretty OK, what do you say?
> 
> Lennart
> 
> -- 
> Lennart Poettering - Red Hat, Inc.

My OCD says otherwise, but I think this seems like a reasonable
solution, since the options end up being mutually exclusive.

d


More information about the systemd-devel mailing list