From dbb8b5bcf78a86020287f98a8d96780af0203672 Mon Sep 17 00:00:00 2001 From: Peter Morrow Date: Wed, 9 Jun 2021 18:04:08 +0100 Subject: [PATCH] man: fix missing markdown & minor errors In #19771 there were a few missing markdown tags a few style issue. Signed-off-by: Peter Morrow --- man/systemd.unit.xml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index a20519a96fe..a17b752d54d 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -2207,14 +2207,14 @@ PrivateTmp=yes Top level drop-ins with template units - Top level drop-ins can be used to change some aspect of all units - of a particular type. For example by creating the - /etc/systemd/system/service.d + Top level per-type drop-ins can be used to change some aspect of + all units of a particular type. For example by creating the + /etc/systemd/system/service.d/ directory with a drop-in file, the contents of the drop-in file can be applied to all service units. We can take this further by having the top-level drop-in instantiate a secondary helper unit. Consider for example the following set of units and drop-in files where we install - an OnFailure dependency for all service units. + an OnFailure= dependency for all service units. /etc/systemd/system/failure-handler@.service: @@ -2226,10 +2226,9 @@ Description=My failure handler for %i Type=oneshot # Perform some special action for when %i exits unexpectedly. ExecStart=/usr/sbin/myfailurehandler %i - - We can then add an instance of the + We can then add an instance of failure-handler@.service as an OnFailure= dependency for all service units. @@ -2237,25 +2236,25 @@ ExecStart=/usr/sbin/myfailurehandler %i /etc/systemd/system/service.d/10-all.conf: [Unit] -OnFailure=failure-handler@%n.service +OnFailure=failure-handler@%N.service Now, after running systemctl daemon-reload all services will have acquired an OnFailure= dependency on - failure-handler@%n.service. The + failure-handler@%N.service. The template instance units will also have gained the dependency which results in the creation of a recursive dependency chain. We can break the chain by disabling the drop-in for the template instance units via a symlink to /dev/null: -mkdir /etc/systemd/system/failure-handler@.service.d +mkdir /etc/systemd/system/failure-handler@.service.d/ ln -s /dev/null /etc/systemd/system/failure-handler@.service.d/10-all.conf systemctl daemon-reload This ensures that if a failure-handler@.service instance fails it will not trigger an instance named - failure-handler@failure-handler.service.service. + failure-handler@failure-handler.service. -- 2.47.3