summaryrefslogtreecommitdiff
path: root/man/systemd-analyze.xml
diff options
context:
space:
mode:
authorAlbert Brox <albert@exypno.tech>2021-09-29 10:09:34 -0400
committerLuca Boccassi <luca.boccassi@gmail.com>2021-11-08 12:08:23 +0000
commitda845dabf576f73f76af2704254e0ce7d8167356 (patch)
tree993d22f8b120fc72bff345057eee74b6332e027a /man/systemd-analyze.xml
parenta6d1760024d0884efb343e1c739f303619f7c8b9 (diff)
downloadsystemd-da845dabf576f73f76af2704254e0ce7d8167356.tar.gz
implement aliasing for systemd-analyze verify
Diffstat (limited to 'man/systemd-analyze.xml')
-rw-r--r--man/systemd-analyze.xml24
1 files changed, 23 insertions, 1 deletions
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
index e072d66131..4c3b6d173b 100644
--- a/man/systemd-analyze.xml
+++ b/man/systemd-analyze.xml
@@ -551,7 +551,8 @@ NAutoVTs=8
<title><command>systemd-analyze verify <replaceable>FILE</replaceable>...</command></title>
<para>This command will load unit files and print warnings if any errors are detected. Files specified
- on the command line will be loaded, but also any other units referenced by them. The full unit search
+ on the command line will be loaded, but also any other units referenced by them. A unit's name on disk
+ can be overridden by specifying an alias after a colon; see below for an example. The full unit search
path is formed by combining the directories for all command line arguments, and the usual unit load
paths. The variable <varname>$SYSTEMD_UNIT_PATH</varname> is supported, and may be used to replace or
augment the compiled in set of unit load paths; see
@@ -613,6 +614,27 @@ Service a.service not loaded, a.socket cannot be started.
Service b@0.service not loaded, b.socket cannot be started.
</programlisting>
</example>
+
+ <example>
+ <title>Aliasing a unit</title>
+
+ <programlisting>$ cat /tmp/source
+[Unit]
+Description=Hostname printer
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/echo %H
+MysteryKey=true
+
+$ systemd-analyze verify /tmp/source
+Failed to prepare filename /tmp/source: Invalid argument
+
+$ systemd-analyze verify /tmp/source:alias.service
+/tmp/systemd-analyze-XXXXXX/alias.service:7: Unknown key name 'MysteryKey' in section 'Service', ignoring.
+ </programlisting>
+ </example>
+
</refsect2>
<refsect2>