2010-07-02 04:38:30 +04:00
<?xml version='1.0'?> <!-- * - nxml - * -->
2019-03-14 16:40:58 +03:00
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
2023-12-25 17:48:33 +03:00
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
2020-11-09 07:23:58 +03:00
<!-- SPDX - License - Identifier: LGPL - 2.1 - or - later -->
2010-07-02 04:38:30 +04:00
2021-09-27 10:09:30 +03:00
<refentry id= "systemd.path" xmlns:xi= "http://www.w3.org/2001/XInclude" >
2015-02-04 05:14:13 +03:00
<refentryinfo >
<title > systemd.path</title>
<productname > systemd</productname>
</refentryinfo>
<refmeta >
<refentrytitle > systemd.path</refentrytitle>
<manvolnum > 5</manvolnum>
</refmeta>
<refnamediv >
<refname > systemd.path</refname>
<refpurpose > Path unit configuration</refpurpose>
</refnamediv>
<refsynopsisdiv >
<para > <filename > <replaceable > path</replaceable> .path</filename> </para>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > A unit configuration file whose name ends in
<literal > .path</literal> encodes information about a path
monitored by systemd, for path-based activation.</para>
<para > This man page lists the configuration options specific to
this unit type. See
<citerefentry > <refentrytitle > systemd.unit</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
for the common options of all unit configuration files. The common
2020-07-06 12:00:06 +03:00
configuration items are configured in the generic [Unit] and
[Install] sections. The path specific configuration options are
configured in the [Path] section.</para>
2015-02-04 05:14:13 +03:00
<para > For each path file, a matching unit file must exist,
describing the unit to activate when the path changes. By default,
a service by the same name as the path (except for the suffix) is
activated. Example: a path file <filename > foo.path</filename>
activates a matching service <filename > foo.service</filename> . The
unit to activate may be controlled by <varname > Unit=</varname>
(see below).</para>
<para > Internally, path units use the
2015-03-14 05:22:39 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > inotify</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry>
2015-02-04 05:14:13 +03:00
API to monitor file systems. Due to that, it suffers by the same
limitations as inotify, and for example cannot be used to monitor
files or directories changed by other machines on remote NFS file
systems.</para>
2020-01-16 18:13:50 +03:00
<para > When a service unit triggered by a path unit terminates (regardless whether it exited successfully
or failed), monitored paths are checked immediately again, and the service accordingly restarted
instantly. As protection against busy looping in this trigger/start cycle, a start rate limit is enforced
on the service unit, see <varname > StartLimitIntervalSec=</varname> and
<varname > StartLimitBurst=</varname> in
<citerefentry > <refentrytitle > systemd.unit</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> . Unlike
other service failures, the error condition that the start rate limit is hit is propagated from the
service unit to the path unit and causes the path unit to fail as well, thus ending the loop.</para>
2015-11-11 22:47:07 +03:00
</refsect1>
2015-02-04 05:14:13 +03:00
2015-11-11 22:47:07 +03:00
<refsect1 >
2018-04-16 19:00:33 +03:00
<title > Automatic Dependencies</title>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<refsect2 >
<title > Implicit Dependencies</title>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<para > The following dependencies are implicitly added:</para>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<itemizedlist >
<listitem > <para > If a path unit is beneath another mount unit in the file
system hierarchy, both a requirement and an ordering dependency
between both units are created automatically.</para> </listitem>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<listitem > <para > An implicit <varname > Before=</varname> dependency is added
between a path unit and the unit it is supposed to activate.</para> </listitem>
</itemizedlist>
</refsect2>
<refsect2 >
<title > Default Dependencies</title>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<para > The following dependencies are added unless <varname > DefaultDependencies=no</varname> is set:</para>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<itemizedlist >
<listitem > <para > Path units will automatically have dependencies of type <varname > Before=</varname> on
<filename > paths.target</filename> ,
dependencies of type <varname > After=</varname> and <varname > Requires=</varname> on
<filename > sysinit.target</filename> , and have dependencies of type <varname > Conflicts=</varname> and
<varname > Before=</varname> on <filename > shutdown.target</filename> . These ensure that path units are terminated
cleanly prior to system shutdown. Only path units involved with early boot or late system shutdown should
disable <varname > DefaultDependencies=</varname> option.</para> </listitem>
</itemizedlist>
2017-09-12 07:02:27 +03:00
2018-04-16 19:00:33 +03:00
<para > </para>
</refsect2>
2015-02-04 05:14:13 +03:00
</refsect1>
<refsect1 >
<title > Options</title>
2021-09-27 10:09:30 +03:00
<para > Path unit files may include [Unit] and [Install] sections, which are described in
<citerefentry > <refentrytitle > systemd.unit</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> .
</para>
<para > Path unit files must include a [Path] section, which carries information about the path or paths it
monitors. The options specific to the [Path] section of path units are the following:</para>
2015-02-04 05:14:13 +03:00
<variablelist class= 'unit-directives' >
<varlistentry >
<term > <varname > PathExists=</varname> </term>
<term > <varname > PathExistsGlob=</varname> </term>
<term > <varname > PathChanged=</varname> </term>
<term > <varname > PathModified=</varname> </term>
<term > <varname > DirectoryNotEmpty=</varname> </term>
<listitem > <para > Defines paths to monitor for certain changes:
<varname > PathExists=</varname> may be used to watch the mere
existence of a file or directory. If the file specified
exists, the configured unit is activated.
2022-08-23 13:12:28 +03:00
<varname > PathExistsGlob=</varname> works similarly, but checks
2015-02-04 05:14:13 +03:00
for the existence of at least one file matching the globbing
pattern specified. <varname > PathChanged=</varname> may be used
to watch a file or directory and activate the configured unit
whenever it changes. It is not activated on every write to the
watched file but it is activated if the file which was open
for writing gets closed. <varname > PathModified=</varname> is
similar, but additionally it is activated also on simple
writes to the watched file.
<varname > DirectoryNotEmpty=</varname> may be used to watch a
directory and activate the configured unit whenever it
contains at least one file.</para>
<para > The arguments of these directives must be absolute file
system paths.</para>
<para > Multiple directives may be combined, of the same and of
different types, to watch multiple paths. If the empty string
is assigned to any of these options, the list of paths to
watch is reset, and any prior assignments of these options
will not have any effect.</para>
<para > If a path already exists (in case of
<varname > PathExists=</varname> and
<varname > PathExistsGlob=</varname> ) or a directory already is
not empty (in case of <varname > DirectoryNotEmpty=</varname> )
at the time the path unit is activated, then the configured
unit is immediately activated as well. Something similar does
not apply to <varname > PathChanged=</varname> and
<varname > PathModified=</varname> .</para>
<para > If the path itself or any of the containing directories
are not accessible, <command > systemd</command> will watch for
permission changes and notice that conditions are satisfied
when permissions allow that. </para> </listitem>
</varlistentry>
<varlistentry >
<term > <varname > Unit=</varname> </term>
<listitem > <para > The unit to activate when any of the
configured paths changes. The argument is a unit name, whose
suffix is not <literal > .path</literal> . If not specified, this
value defaults to a service that has the same name as the path
unit, except for the suffix. (See above.) It is recommended
that the unit name that is activated and the unit name of the
path unit are named identical, except for the
suffix.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <varname > MakeDirectory=</varname> </term>
<listitem > <para > Takes a boolean argument. If true, the
directories to watch are created before watching. This option
is ignored for <varname > PathExists=</varname> settings.
Defaults to <option > false</option> .</para> </listitem>
</varlistentry>
<varlistentry >
<term > <varname > DirectoryMode=</varname> </term>
<listitem > <para > If <varname > MakeDirectory=</varname> is
enabled, use the mode specified here to create the directories
in question. Takes an access mode in octal notation. Defaults
to <option > 0755</option> .</para> </listitem>
</varlistentry>
2021-12-18 20:52:52 +03:00
<varlistentry >
<term > <varname > TriggerLimitIntervalSec=</varname> </term>
<term > <varname > TriggerLimitBurst=</varname> </term>
2022-02-23 00:54:23 +03:00
<listitem > <para > Configures a limit on how often this path unit may be activated within a specific
time interval. The <varname > TriggerLimitIntervalSec=</varname> may be used to configure the length of
the time interval in the usual time units <literal > us</literal> , <literal > ms</literal> ,
<literal > s</literal> , <literal > min</literal> , <literal > h</literal> , … and defaults to 2s. See
<citerefentry > <refentrytitle > systemd.time</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry> for
details on the various time units understood. The <varname > TriggerLimitBurst=</varname> setting takes
a positive integer value and specifies the number of permitted activations per time interval, and
defaults to 200. Set either to 0 to disable any form of trigger rate limiting. If the limit is hit,
2022-10-15 17:06:20 +03:00
the unit is placed into a failure mode, and will not watch the paths anymore until restarted. Note
2023-08-22 19:52:36 +03:00
that this limit is enforced before the service activation is enqueued.</para>
<xi:include href= "version-info.xml" xpointer= "v250" /> </listitem>
2021-12-18 20:52:52 +03:00
</varlistentry>
2015-02-04 05:14:13 +03:00
</variablelist>
2021-09-27 10:09:30 +03:00
<xi:include href= "systemd.service.xml" xpointer= "shared-unit-options" />
2015-02-04 05:14:13 +03:00
</refsect1>
<refsect1 >
<title > See Also</title>
2022-08-02 22:07:35 +03:00
<para > Environment variables with details on the trigger will be set for triggered units. See the
2023-05-17 13:24:04 +03:00
section <literal > Environment Variables Set or Propagated by the Service Manager</literal> in
man: fix issues reported by the manpage-l10n project
Fixes #25780.
> Man page: crypttab.5
> Issue 1: Missing fullstop
> Issue 2: I<cipher=>, I<hash=>, I<size=> → B<cipher=>, B<hash=>, B<size=>
>
> "Force LUKS mode\\&. When this mode is used, the following options are "
> "ignored since they are provided by the LUKS header on the device: "
> "I<cipher=>, I<hash=>, I<size=>"
Seems OK to me. The full stop is there and has been for at least a few years. And we use <option> for the markup, which is appropriate here.
> Man page: crypttab.5
> Issue 1: Missing fullstop
> Issue 2: I<cipher=>, I<hash=>, I<keyfile-offset=>, I<keyfile-size=>, I<size=> → B<cipher=>, B<hash=>, B<keyfile-offset=>, B<keyfile-size=>, B<size=>
>
> "Use TrueCrypt encryption mode\\&. When this mode is used, the following "
> "options are ignored since they are provided by the TrueCrypt header on the "
> "device or do not apply: I<cipher=>, I<hash=>, I<keyfile-offset=>, I<keyfile-"
> "size=>, I<size=>"
Same.
> Man page: journalctl.1
> Issue 1: make be → may be
Fixed.
> Issue 2: below\\&. → below:
Fixed.
> Man page: journalctl.1
> Issue: Colon at the end?
>
> "The following commands are understood\\&. If none is specified the default "
> "is to display journal records\\&."
> msgstr ""
> "Die folgenden Befehle werden verstanden\\&. Falls keiner festgelegt ist, ist "
> "die Anzeige von Journal-Datensätzen die Vorgabe\\&."
This is a bit awkward, but I'm not sure how to fix it.
> Man page: kernel-install.8
> Issue: methods a fallback → methods fallback
It was correct, but I added a comma to make the sense clearer.
> Man page: loader.conf.5
> Issue 1: secure boot variables → Secure Boot variables
> Issue 2: one → one for (multiple times)
>
> "Supported secure boot variables are one database for authorized images, one "
> "key exchange key (KEK) and one platform key (PK)\\&. For more information, "
> "refer to the \\m[blue]B<UEFI specification>\\m[]\\&\\s-2\\u[2]\\d\\s+2, "
> "under Secure Boot and Driver Signing\\&. Another resource that describe the "
> "interplay of the different variables is the \\m[blue]B<EDK2 "
> "documentation>\\m[]\\&\\s-2\\u[3]\\d\\s+2\\&."
"one of" would sound strange. "One this and one that" is OK.
> Man page: loader.conf.5
> Issue: systemd-boot → B<systemd-boot>(7)
Fixed.
> Man page: logind.conf.5
> Issue: systemd-logind → B<systemd-logind>(8)
We use <filename>systemd-logind</> on subsequent references… I think that's good enough.
> Man page: nss-myhostname.8
> Issue: B<getent> → B<getent>(1)
Fixed.
> Man page: nss-resolve.8
> Issue: B<systemd-resolved> → B<systemd-resolved>(8)
The first reference does this, subsequent are shorter.
> Man page: os-release.5
> Issue: Portable Services → Portable Services Documentation?
Updated.
> Man page: pam_systemd_home.8
> Issue: auth and account use "reason", while session and password do not?
Reworded.
> Man page: portablectl.1
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: repart.d.5
> Issue: The partition → the partition
Fixed.
> Man page: repart.d.5
> Issue: B<systemd-repart> → B<systemd-repart>(8)
The first reference does this. I also change this one, because it's pretty far down in the text.
> Man page: systemd.1
> Issue: kernel command line twice?
>
> "Takes a boolean argument\\&. If false disables importing credentials from "
> "the kernel command line, qemu_fw_cfg subsystem or the kernel command line\\&."
Apparently this was fixed already.
> Man page: systemd-boot.7
> Issue: enrollement → enrollment
Fixed.
> Man page: systemd-cryptenroll.1
> Issue: multiple cases: any specified → the specified
Reworded.
> Man page: systemd-cryptenroll.1
> Issue: If this this → If this
Fixed tree-wide.
> Man page: systemd-cryptsetup-generator.8
> Issue: and the initrd → and in the initrd
"Is honoured by the initrd" is OK, because we often speak about the initrd as a single unit. But in the same paragraph we also used "in the initrd", which makes the other use look sloppy. I changed it to "in the initrd" everywhere in that file.
> Man page: systemd.directives.7
> Issue: Why are these two quoted (but not others)?
>
> "B<\\*(Aqh\\*(Aq>"
>
> B<\\*(Aqs\\*(Aq>"
>
> "B<\\*(Aqy\\*(Aq>"
This is autogenerated from files… We use slightly different markup in different files, and it's just too hard to make it consistent. We gave up on this.
> Man page: systemd.exec.5
> Issue 1: B<at>(1p) → B<at>(1)
> Issue 2: B<crontab>(1p) → B<crontab>(1)
Fixed.
> Man page: systemd.exec.5
> Issue: B<select()> → B<select>(2)
Fixed.
> Man page: systemd.exec.5
> Issue: qemu → B<qemu>(1)
The man page doesn't seem to be in any of the canonical places on the web.
I added a link to online docs.
> Man page: systemd.exec.5
> Issue: variable → variables
Seems to be fixed already.
> Man page: systemd-integritysetup-generator.8
> Issue: systemd-integritysetup-generator → B<systemd-integritysetup-generator>
I changed <filename> to <command>.
> Man page: systemd-integritysetup-generator.8
> Issue: superfluous comma at the end
Already fixed.
> Man page: systemd-measure.1
> Issue: (see B<--pcr-bank=>) below → (see B<--pcr-bank=> below)
Reworded.
> Man page: systemd-measure.1
> Issue: =PATH> → =>I<PATH>
Fixed.
> Man page: systemd-measure.1.po
> Issue: B<--bank=DIGEST> → B<--bank=>I<DIGEST>
Fixed.
> Man page: systemd.netdev.5
> Issue: os the → on the
Appears to have been fixed already.
> Man page: systemd.netdev.5
> Issue: Onboard → On-board (as in previous string)
Updated.
> Man page: systemd.network.5
> Issue: B<systemd-networkd> -> B<systemd-networkd>(8)
First reference does this, subsequent do not.
> Man page: systemd.network.5
> Issue: B<netlabelctl> → B<netlabelctl>(8)
First reference does this, subsequent do not.
> Man page: systemd.network.5
> Issue: Missing verb (aquired? configured?) in the half sentence starting with "or by a "
I dropped the comma.
> Man page: systemd-nspawn.1
> Issue: All host users outside of that range → All other host users
Reworded.
> # FIXME no effect → no effect\\&.
> #. type: Plain text
> #: archlinux debian-unstable fedora-rawhide mageia-cauldron opensuse-tumbleweed
> msgid ""
> "Whichever ID mapping option is used, the same mapping will be used for users "
> "and groups IDs\\&. If B<rootidmap> is used, the group owning the bind "
> "mounted directory will have no effect"
A period is added. Not sure if there's some other issue.
> Man page: systemd-oomd.service.8
> Issue: B<systemd> → B<systemd>(1)
Done.
> Man page: systemd.path.5
> Issue 1: B<systemd.exec>(1) → B<systemd.exec>(5)
> Issue 2: This section does not (yet?) exist
Fixed.
> Man page: systemd-pcrphase.service.8
> Issue 1: indicate phases into TPM2 PCR 11 ??
> Issue 2: Colon at the end of the paragraph?
Fixed.
> Man page: systemd-pcrphase.service.8
> Issue: final boot phase → final shutdown phase?
Updated.
> Man page: systemd-pcrphase.service.8
> Issue: for the the → for the
Fixed tree-wide.
> Man page: systemd-portabled.service.8
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: systemd-pstore.service.8
> Issue: Here and the following paragraphs: . → \\&. // Upstream: What does this comment mean? // You normally write \\&. for a full dot (full stop etc.); here you write only "." (i.e. a plain dot).
>
> "and we look up \"localhost\", nss-dns will send the following queries to "
> "systemd-resolved listening on 127.0.0.53:53: first \"localhost.foobar.com\", "
> "then \"localhost.barbar.com\", and finally \"localhost\". If (hopefully) the "
> "first two queries fail, systemd-resolved will synthesize an answer for the "
> "third query."
Looks all OK to me.
> Man page: systemd.resource-control.5
> Issue: Missing closing bracket after link to Control Groups version 1
Fixed.
> Man page: systemd-sysext.8
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: systemd.timer.5
> Issue 1: B<systemd.exec>(1) → B<systemd.exec>(5)
> Issue 2: This section does not (yet?) exist
Fixed.
> Man page: systemd.unit.5
> Issue: that is → that are
Fixed.
> Man page: systemd-veritysetup-generator.8
> Issue: systemd-veritysetup-generator → B<systemd-veritysetup-generator>
>
> "systemd-veritysetup-generator implements B<systemd.generator>(7)\\&."
>
> "systemd-veritysetup-generator understands the following kernel command line "
> "parameters:"
Updated.
> Man page: systemd-volatile-root.service.8
> Issue: initrdyes → Initrd
Fixed.
> Man page: sysupdate.d.5
> Issue: : → \\&. (As above in TRANSFER)
Updated.
> Man page: sysupdate.d.5
> Issue: some → certain
Updated.
> Man page: sysupdate.d.5
> Issue 1: i\\&.e\\& → I\\&.e\\&
Fixed.
> Issue 2: the image → the system
"image" seems correct.
> Man page: tmpfiles.d.5
> Issue: systemd-tmpfiles → B<systemd-tmpfiles>(8)
Updated.
2023-01-11 18:45:59 +03:00
<citerefentry > <refentrytitle > systemd.exec</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
2022-08-02 22:07:35 +03:00
for more details.</para>
2023-12-22 21:09:32 +03:00
<para > <simplelist type= "inline" >
<member > <citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemctl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd.unit</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd.service</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> </member>
<member > <citerefentry project= 'man-pages' > <refentrytitle > inotify</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd.directives</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry> </member>
</simplelist> </para>
2015-02-04 05:14:13 +03:00
</refsect1>
2010-07-02 04:38:30 +04:00
</refentry>