From: Zbigniew Jędrzejewski-Szmek Date: Mon, 4 Feb 2013 03:23:53 +0000 (-0500) Subject: man: describe unit load path in systemd.unit(5) X-Git-Tag: v198~337 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=13219b7f74cb2722746b953bbec7593d5cc665e3 man: describe unit load path in systemd.unit(5) In other cases where multiple directories are searched for unit files, the list of directories is described in the man page describing the format. I think this makes sense too in case of systemd directories, since the systemd(1) manpage already has an overview of many different topics. --- diff --git a/Makefile.am b/Makefile.am index 6e5f5af9a..d8546b51e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3345,6 +3345,8 @@ SED_PROCESS = \ -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \ -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \ -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ + -e 's,@SYSTEM_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/system,g' \ + -e 's,@USER_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/user,g' \ -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ -e 's,@systemunitdir\@,$(systemunitdir),g' \ -e 's,@userunitdir\@,$(userunitdir),g' \ diff --git a/man/systemd.unit.xml.in b/man/systemd.unit.xml.in index 7c3a6c75f..43f5ffc1f 100644 --- a/man/systemd.unit.xml.in +++ b/man/systemd.unit.xml.in @@ -48,16 +48,28 @@ - systemd.service, - systemd.socket, - systemd.device, - systemd.mount, - systemd.automount, - systemd.swap, - systemd.target, - systemd.path, - systemd.timer, - systemd.snapshot + service.service, + socket.socket, + device.device, + mount.mount, + automount.automount, + swap.swap, + target.target, + path.path, + timer.timer, + snapshot.snapshot + + /etc/systemd/system/* +/run/systemd/system/* +/usr/lib/systemd/system/* +... + + + /etc/systemd/user/* +/run/systemd/user/* +/usr/lib/systemd/user/* +... + @@ -66,7 +78,7 @@ A unit configuration file encodes information about a service, a socket, a device, a mount point, an automount point, a swap file or partition, a start-up - target, a file system path or a timer controlled and + target, a file system path, or a timer controlled and supervised by systemd1. The syntax is inspired by + information: + systemd.service5, + systemd.socket5, + systemd.device5, + systemd.mount5, + systemd.automount5, + systemd.swap5, + systemd.target5, + systemd.path5, + systemd.timer5, + systemd.snapshot5. + + + Unit files are loaded from a set of paths + determined during compilation, described in the next section. + Unit files may contain additional options on top of those listed here. If systemd encounters an unknown @@ -214,6 +241,153 @@ + + Unit load path + + Unit files are loaded from a set of paths + determined during compilation, described in the two + tables below. Unit files found in directories higher + in the hierarchy override files with the same name + lower in the hierarchy, thus allowing overrides. + + + When systemd is running in session mode + () and the variable + $SYSTEMD_UNIT_PATH is set, this + contents of this variable overrides the unit load + path. + + + + + Load path when running in system mode (<option>--system</option>). + + + + + + + + Path + Description + + + + + /run/systemd/generator.early + Generated units + + + @SYSTEM_CONFIG_UNIT_PATH@ + Local configuration + + + /etc/systemd/system + + + /run/systemd/systemd + Volatile units + + + /run/systemd/generator + Generated units + + + /usr/local/lib/systemd/system + Units for local packages + + + @systemunitdir@ + Systemd package configuration + + + /usr/lib/systemd/system + Units for installed packages + + + /lib/systemd/system + + + /run/systemd/generator.late + Generated units + + + +
+ + + + Load path when running in session mode (<option>--user</option>). + + + + + + + + Path + Description + + + + + /tmp/systemd-generator.early.XXXXXX + Generated units + + + @USER_CONFIG_UNIT_PATH@ + Local configuration + + + /etc/systemd/user + + + /run/systemd/user + Volatile units + + + /tmp/systemd-generator.XXXXXX + Generated units + + + /usr/local/lib/systemd/user + Units for local packages + + + /usr/local/share/systemd/user + + + @userunitdir@ + Systemd package configuration + + + /usr/lib/systemd/user + Units for installed packages + + + /usr/share/systemd/user + + + /tmp/systemd-generator.late.XXXXXX + Generated units + + + +
+ + Note: the paths listed above are set at + compilation time and differ between distributions. The + "authorative" list is printed by + systemd at during start and daemon + reconfiguration. + + Additional units might be loaded into systemd + ("linked") from directories not on the unit load + path. See the link command for + systemctl1. + +
+ Options diff --git a/man/systemd.xml b/man/systemd.xml index bae90a5f0..5380ae8b6 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -535,7 +535,9 @@ disable commands of the systemctl1 - tool. + tool. Full list of directories is provided in + systemd.unit5. + @@ -564,7 +566,9 @@ tool can handle both global (i.e. for all users) and private (for one user) enabling/disabling of - units. + units. Full list of directories is provided in + systemd.unit5. +