Difference: SystemdDocs (5 vs. 6)

Revision 62014-12-05 - ascobie

Line: 1 to 1
 
META TOPICPARENT name="SL7PortHome"

LCFG systemd documentation

Line: 74 to 74
 
    • lcfg-openssh.service (after lcfg-multi-user-stable.target)
    • getty.service (after lcfg-multi-user-stable.target)
Added:
>
>
See this blog post Fun with systemd targets for some explanation of the above targets.
 This SVG file shows the dependencies between targets and LCFG services, pruned at basic.target. You can use inkscape to display this file.
Added:
>
>

Systemd notes of interest

Overriding dependencies

It does not appear possible to override dependencies defined through a unit’s .wants or .requires directories.

A unit can declare a ‘want’ or ‘require’ either through directives in its unit file or through links created in a .wants or .requires directory.

You can easily override dependencies specified in a unit’s unit file, by creating a file of the same name in /etc with the offending directives removed. This file is simply used instead of the file in /lib. For example, unit sshd.service might specify that it ‘Wants’ kerberos.service by means of a Wants directive in its unit file /lib/systemd/sshd.service. One can override this by creating an /etc/systemd/sshd.service with the offending Wants directive removed.

One might expect that creating unit’s .wants or .requires directories in /etc would override the equivalent directories in /lib, but that is not the case. For example, ntpd.service may specify that it ‘Requires’ network.target by means of a symlink, in /lib/systemd/ntpd.service.requires, to the network.target unit file. One might expect that you could remove this dependency by creating a directory /etc/systemd/ntpd.service.requires without the offending symlink. Unfortunately this isn’t what happens – instead, systemd uses the union of /etc/systemd/ntpd.service.requires and /lib/systemd/ntpd.service.requires.

Target dependencies

If you have a target B.target which wants/requires S.service and you want S.service to start after A.target - it isn't sufficient to state B.target 'requires' and 'after' A.target. If you just do that, S.service will start based on its own requires/afters - usually much earlier than after A.target. You also need to state that S.service 'requires' and 'after' A.target.

 

Schema

Added:
>
>
This section is WIP.
 
@units
type_{unittag}
realname_{unittag}
Line: 114 to 134
 

META FILEATTACHMENT attachment="systemd-lcfg.svg" attr="h" comment="" date="1413459994" name="systemd-lcfg.svg" path="systemd-lcfg.svg" size="180544" user="ascobie" version="1"
Added:
>
>
META TOPICMOVED by="ascobie" date="1417797255" from="LCFG.SL7ProjectSystemdSchema" to="LCFG.SystemdDocs"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback