[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shepherd] herd status suggestion
From: |
Nils Gillmann |
Subject: |
Re: [shepherd] herd status suggestion |
Date: |
Sun, 10 Jun 2018 14:31:53 +0000 |
Ricardo Wurmus transcribed 982 bytes:
>
> Hi Nils,
>
> > abyayala$ sudo herd status tor
> > Status of tor:
> > It is stopped.
> > It is disabled.
> > Provides (tor).
> > Requires (user-processes loopback syslogd).
> > Conflicts with ().
> > Will be respawned.
> > Last respawned on Sun Jun 10 08:08:45Z 2018.
> >
> >
> > Would it be an option to change the status output to,
> > if it conflicts with no other service:
> >
> > Conflicts with no other services.
> >
> > instead of the representation of an empty list?
>
> This sounds like a good idea. The only argument in favour of keeping it
> the way it is now is too weak to take serious: it makes it slightly
> easier to parse the output of “herd status”.
>
> Could you please prepare a patch to change the output? It’s also worth
> checking how gettext is used in shepherd (I don’t know more than that it
> uses “l10n” as a “gettext” alias) to make sure that the string can be
> translated.
>
> Thanks for this proposal!
>
> --
> Ricardo
>
>
Thanks!
I will look into this, I've looked at the file for the first time (ever? in a
long time?) today.
If I can't figure out how to do all of it, I'll send further questions.
Related and similar: Would it be reasonable to change the output from
list-style,
like:
Depends on: (foo bar irks boot)
to the probably tiny bit better readable:
Depends on: foo, bar, irks, boot
for humans?
I'm thinking that even though it is very obvious what we are looking at, we
could almost entire sentences?
However, it's "interesting" to form sentences here without sounding like
Captain Obvious...
Status of the service 'tor':
It is stopped.
It is disabled.
Provides (tor). <- 'tor' provides a service for running tor. (? I
haven't looked at the shepherd and our use of it, so this is just assuming this
is possible.)
Requires (user-processes loopback syslogd). <- 'tor' requires these
services: uer-processes, loopback, syslogd.
Conflicts with (). <- There are no conflicting
services./Conflicts with no other services. (when empty) | alternative, when
at least 1 element: 'tor' conflicts with: element.
Will be respawned. <- Upon crash, tor will be respawned.
Last respawned on Sun Jun 10 08:08:45Z 2018.
But it could be that his is too long for output, and maybe could even be
reduced to the simple statements we have.
Is there any documented work besides the code and documentation on why shepherd
produces this output, any
logical conclusions or...?