From: Zbigniew Jędrzejewski-Szmek Date: Thu, 25 Feb 2021 13:54:54 +0000 (+0100) Subject: man: advertise shared drop-ins more X-Git-Tag: v248-rc3~108^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8136f1bc03d1bdf93b9071b4f82123b81a05c8e;p=thirdparty%2Fsystemd.git man: advertise shared drop-ins more systemd.unit(5) is a wall of text. And this particular feature can be very useful in the context of resource control. Let's avertise this cool feature a bit more. Fixes #17900. --- diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml index 33b6fcee878..7062cd36379 100644 --- a/man/systemd.resource-control.xml +++ b/man/systemd.resource-control.xml @@ -63,6 +63,25 @@ url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New Control Group Interfaces for an introduction on how to make use of resource control APIs from programs. + + + Setting resource controls for a group of related units + + As described in + systemd.unit5, the + settings listed here may be set through the main file of a unit and drop-in snippets in + *.d/ directories. The list of directories searched for drop-ins + includes names formed by repeatedly truncating the unit name after all dashes. This is particularly + convenient to set resource limits for a group of units with similar names. + + For example, every user gets their own slice + user-nnn.slice. Drop-ins with local configuration that + affect user 1000 may be placed in + /etc/systemd/system/user-1000.slice, + /etc/systemd/system/user-1000.slice.d/*.conf, but also + /etc/systemd/system/user-.slice.d/*.conf. This last directory + applies to all user slices. + diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 4d7d09c5c0d..0453c783b6d 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -190,8 +190,8 @@ headers. For instantiated units, this logic will first look for the instance .d/ subdirectory (e.g. foo@bar.service.d/) and read its .conf files, followed by the template .d/ subdirectory (e.g. foo@.service.d/) and the .conf - files there. Moreover for units names containing dashes (-), the set of directories generated by - truncating the unit name after all dashes is searched too. Specifically, for a unit name + files there. Moreover for unit names containing dashes (-), the set of directories generated by + repeatedly truncating the unit name after all dashes is searched too. Specifically, for a unit name foo-bar-baz.service not only the regular drop-in directory foo-bar-baz.service.d/ is searched but also both foo-bar-.service.d/ and foo-.service.d/. This is useful for defining common drop-ins for a set of related units, whose