1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2014 Zbigniew Jędrzejewski-Szmek
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd-verify"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>systemd-verify</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Zbigniew</firstname>
35 <surname>Jędrzejewski-Szmek</surname>
36 <email>zbyszek@in.waw.pl</email>
42 <refentrytitle>systemd-verify</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>systemd-verify</refname>
48 <refpurpose>Check unit file validity</refpurpose>
53 <command>systemd-verify</command>
54 <arg choice="opt" rep="repeat">OPTIONS</arg>
55 <arg choice="opt" rep="repeat">FILES</arg>
60 <title>Description</title>
62 <para><filename>systemd-verify</filename> will load unit files and
63 potentially print warnings if any errors are detected. Files
64 specified on the command line will be loaded, but also any other
65 units referenced by them.</para>
67 <para>This command works by prepending the directories for all
68 command line arguments at the beginning of the unit load path.
69 This means that all units files found in those directories will
70 be used in preference to the unit files found in the standard
71 locations, even if not listed explicitly.</para>
73 <para>The following errors are currently detected:</para>
75 <listitem><para>unknown sections and directives,
78 <listitem><para>missing dependencies which are required to start
79 the given unit,</para></listitem>
81 <listitem><para>man pages listed in
82 <varname>Documentation=</varname> which are not found in the
83 system,</para></listitem>
85 <listitem><para>commands listed in <varname>ExecStart=</varname>
86 and similar which are not found in the system or not executable.
92 <title>Options</title>
94 <para>The following options are understood:</para>
98 <term><option>--no-man</option></term>
100 <listitem><para>Do not invoke man to verify the existence
101 of man pages listen in <varname>Documentation=</varname>.
105 <xi:include href="user-system-options.xml" xpointer="user" />
106 <xi:include href="user-system-options.xml" xpointer="system" />
108 <xi:include href="standard-options.xml" xpointer="help" />
109 <xi:include href="standard-options.xml" xpointer="version" />
114 <title>Exit status</title>
116 <para>On success, 0 is returned, a non-zero failure
117 code otherwise.</para>
121 <title>Examples</title>
124 <title>Misspelt directives</title>
126 <programlisting>$ cat ./user.slice
129 Documentation=man:systemd.nosuchfile(7)
130 Requires=different.service
135 $ systemd-verify ./user.slice
136 [./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
137 [./user.slice:13] Unknown section 'Service'. Ignoring.
138 Error: org.freedesktop.systemd1.LoadFailed: Unit different.service failed to load: No such file or directory.
139 Failed to create user.slice/start: Invalid argument
140 user.slice: man systemd.nosuchfile(7) command failed with code 16
145 <title>Missing service units</title>
147 <programlisting>$ tail ./a.socket ./b.socket
148 ==> ./a.socket <==
152 ==> ./b.socket <==
157 $ systemd-verify ./a.socket ./b.socket
158 Service a.service not loaded, a.socket cannot be started.
159 Service b@0.service not loaded, b.socket cannot be started.
166 <title>See Also</title>
168 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
169 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
170 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
171 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>