[systemd-devel] Better docs: Word "Type" has two meanings

Thomas Güttler Lists guettliml at thomas-guettler.de
Sat Jan 6 10:45:19 UTC 2018


Am 06.01.2018 um 09:38 schrieb Zbigniew Jędrzejewski-Szmek:
> On Thu, Jan 04, 2018 at 11:54:05AM +0100, Thomas Güttler wrote:
>>     https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=
>>     > Type: Configures the process start-up type for this service unit. ....
>>
>>     https://www.freedesktop.org/software/systemd/man/systemctl.html#-t
>>     > -t, --type= The argument should be a comma-separated list of unit types
>>     such as service and socket.
> It seems that the distinction is made clear: "process start-up type"
> vs. "unit type". Do you have a specific suggestion how this could be
> improved?

Hi Zbyszek, thank you for your reply.

I don't know how many "types" exist in systemd world. Up to now I know two:
unit type and start-up type ...

I try to recall where I got confused.

I looked at the docs of "systemctl --help" there I read "-t 
--type=TYPE      List units of a particular type"

Some days ago I wrote my first systemd service file and I used 
"Type=simple".

I tried this:

    root at pc:~# systemctl --type=simple
    Unknown unit type or load state 'simple'.

Now I see some specific ways to make this more easy for new comers:


The error message "Unknown unit type or load state 'simple'." should 
list all available unit types.

Maybe like "Unknown unit type or load state 'simple'. Use 'socket' or 
'service'."

----

"systemctl --help" could list the available types:

"-t --type=TYPE      List units of a particular type (socket or service)"

----

BTW: Why do unit type and load state get combined into one thing here?

----

The man page of systemclt:
-t, --type= The argument should be a comma-separated list of unit types
    such as service and socket.

If I read this, I am unsure which unit types exist. The wording "such 
as" suggest that
  "service" and "socket" are just two of many available unit types. It 
would be nice
if the reader see all types and understand that this list is complete.


Regards,
   Thomas

-- 
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines



More information about the systemd-devel mailing list