summaryrefslogtreecommitdiff
path: root/man/systemd.unit.xml
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2015-05-27 02:38:19 -0700
committerLennart Poettering <lennart@poettering.net>2015-05-28 19:28:19 +0200
commit681eb9cf2b831293a4f3d4c48a748d2e4a25d69e (patch)
tree9293679b667f4d0dd0c525913b5d0ede61460550 /man/systemd.unit.xml
parent5f529f4c97a141457301477505ae7eb4c28cf610 (diff)
man: generate configured paths in manpages
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
Diffstat (limited to 'man/systemd.unit.xml')
-rw-r--r--man/systemd.unit.xml30
1 files changed, 15 insertions, 15 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 0aa1eeac7..8286cf3f7 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -64,20 +64,20 @@
<filename><replaceable>slice</replaceable>.slice</filename>,
<filename><replaceable>scope</replaceable>.scope</filename></para>
- <para><literallayout><filename>/etc/systemd/system/*</filename>
+ <para><literallayout><filename>&pkgsysconfdir;/system/*</filename>
<filename>/run/systemd/system/*</filename>
-<filename>/usr/lib/systemd/system/*</filename>
+<filename>&rootlibexecdir;/system/*</filename>
<filename>...</filename>
</literallayout></para>
<para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename>
<filename>$HOME/.config/systemd/user/*</filename>
-<filename>/etc/systemd/user/*</filename>
+<filename>&pkgsysconfdir;/user/*</filename>
<filename>$XDG_RUNTIME_DIR/systemd/user/*</filename>
<filename>/run/systemd/user/*</filename>
<filename>$XDG_DATA_HOME/systemd/user/*</filename>
<filename>$HOME/.local/share/systemd/user/*</filename>
-<filename>/usr/lib/systemd/user/*</filename>
+<filename>&rootlibexecdir;/user/*</filename>
<filename>...</filename>
</literallayout></para>
</refsynopsisdiv>
@@ -287,7 +287,7 @@
</thead>
<tbody>
<row>
- <entry><filename>/etc/systemd/system</filename></entry>
+ <entry><filename>&pkgsysconfdir;/system</filename></entry>
<entry>Local configuration</entry>
</row>
<row>
@@ -295,7 +295,7 @@
<entry>Runtime units</entry>
</row>
<row>
- <entry><filename>/usr/lib/systemd/system</filename></entry>
+ <entry><filename>&rootlibexecdir;/system</filename></entry>
<entry>Units of installed packages</entry>
</row>
</tbody>
@@ -326,7 +326,7 @@
<entry>User configuration (only used when $XDG_CONFIG_HOME is not set)</entry>
</row>
<row>
- <entry><filename>/etc/systemd/user</filename></entry>
+ <entry><filename>&pkgsysconfdir;/user</filename></entry>
<entry>Local configuration</entry>
</row>
<row>
@@ -346,7 +346,7 @@
<entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</entry>
</row>
<row>
- <entry><filename>/usr/lib/systemd/user</filename></entry>
+ <entry><filename>&rootlibexecdir;/user</filename></entry>
<entry>Units of packages that have been installed system-wide</entry>
</row>
</tbody>
@@ -1296,7 +1296,7 @@ ExecStart=/usr/sbin/foo-daemon
<para>After running <command>systemctl enable</command>, a
symlink
- <filename>/etc/systemd/system/multi-user.target.wants/foo.service</filename>
+ <filename>&pkgsysconfdir;/system/multi-user.target.wants/foo.service</filename>
linking to the actual unit will be created. It tells systemd to
pull in the unit when starting
<filename>multi-user.target</filename>. The inverse
@@ -1309,11 +1309,11 @@ ExecStart=/usr/sbin/foo-daemon
<para>There are two methods of overriding vendor settings in
unit files: copying the unit file from
- <filename>/usr/lib/systemd/system</filename> to
- <filename>/etc/systemd/system</filename> and modifying the
+ <filename>&rootlibexecdir;/system</filename> to
+ <filename>&pkgsysconfdir;/system</filename> and modifying the
chosen settings. Alternatively, one can create a directory named
<filename><replaceable>unit</replaceable>.d/</filename> within
- <filename>/etc/systemd/system</filename> and place a drop-in
+ <filename>&pkgsysconfdir;/system</filename> and place a drop-in
file <filename><replaceable>name</replaceable>.conf</filename>
there that only changes the specific settings one is interested
in. Note that multiple such drop-in files are read if
@@ -1343,7 +1343,7 @@ ExecStart=/usr/sbin/foo-daemon
load paths for further details.</para>
<para>Suppose there is a vendor-supplied unit
- <filename>/usr/lib/systemd/system/httpd.service</filename> with
+ <filename>&rootlibexecdir;/system/httpd.service</filename> with
the following contents:</para>
<programlisting>[Unit]
@@ -1375,7 +1375,7 @@ WantedBy=multi-user.target</programlisting>
the niceness of the service to its default value of 0.</para>
<para>The first possibility is to copy the unit file to
- <filename>/etc/systemd/system/httpd.service</filename> and
+ <filename>&pkgsysconfdir;/system/httpd.service</filename> and
change the chosen settings:</para>
<programlisting>[Unit]
@@ -1395,7 +1395,7 @@ WantedBy=multi-user.target</programlisting>
<para>Alternatively, the administrator could create a drop-in
file
- <filename>/etc/systemd/system/httpd.service.d/local.conf</filename>
+ <filename>&pkgsysconfdir;/system/httpd.service.d/local.conf</filename>
with the following contents:</para>
<programlisting>[Unit]