[systemd-devel] [PATCH v2 1/2] systemd.unit(5): add examples for common tasks

Christian Seiler christian at iwakd.de
Tue Jan 27 10:26:42 PST 2015


Am 27.01.2015 um 19:12 schrieb Lennart Poettering:
> On Tue, 27.01.15 17:45, Christian Seiler (christian at iwakd.de) wrote:
> 
>> Add examples for (a) making units enableable and (b) overriding vendor
>> settings to the man page.
> 
> I am not a native english speaker, but I am not sure there's a word
> like "enableable" in the english language. Maybe rephrase this as
> "allowing units to be enabled"?

Drat. I've read that in technical contexts often enough, and for safety
I typed it into google. There were enough results there to make me think
'oh, ok, it's a real word'. A quick look in a dictionary disagrees with
that assessment. Oh well. (Although the urban dictionary does have that
word, but my guess is you won't accept that as a canonical source for
the English language. ;-))

I'll change it.

>> +                        linking to the actual unit will be created. It
>> +                        tells systemd to pull in the unit when starting
>> +                        <filename>multi-user.target</filename>. The
>> +                        converse <command>systemctl disable</command>
>> +                        will remove that symlink again.</para>
>> +                </example>
> 
> converse? shouldn't it be reverse or inverse?

Hmm, converse was the first word that popped into my head, but inverse
is probably better, yes.

>> +                        <programlisting>[Unit]
>> +Description=Some HTTP server
>> +After=network.target remote-fs.target sqldb.service
> 
> Given the fact that "network.target" is so vaguely defined, and not
> even necessary in most cases, I'd really suggest removing this bit
> fromt the After= line.

Ok.

>> +[Service]
>> +Type=notify
>> +ExecStart=/usr/sbin/some-fancy-httpd-server
>> +TimeoutStartSec=5
> 
> I think the default timeout should be fine. THere's usually no good
> reason to change it.

I know, but I wanted to have something that was easily understandable at
first glance that was already set in the original unit that would then
be overridden. I'll use Nice= instead, that's more likely to be used.

>> +                        <para>The first possibility is to copy the unit
>> +                        file to
>> +                        <filename>/etc/systemd/system/httpd.service</filename>
>> +                        and change the chosen settings:</para>
>> +
>> +                        <programlisting>[Unit]
>> +Description=Some HTTP server
>> +After=network.target remote-fs.target sqldb.service <emphasis>memcached.service</emphasis>
>> +Requires=sqldb.service <emphasis>memcached.service</emphasis>
>> +ConditionPathExists=<emphasis>/srv/www</emphasis>
> 
> I wonder if the example should better use AssertionXYZ rather than
> ConditionXYZ for this?

A right, that's new, I'll use that instead.

Will send second patch after your response to my question.

Christian



More information about the systemd-devel mailing list