chiark / gitweb /
man: document ConditionNeedsUpdate=
authorLennart Poettering <lennart@poettering.net>
Mon, 30 Jun 2014 23:33:56 +0000 (01:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 30 Jun 2014 23:33:56 +0000 (01:33 +0200)
man/systemd.unit.xml

index 032879a0afdea99327c7f9598dc9b6274e6a9b09..960fb90dbd1d8080bbb97958327b0574b5270300 100644 (file)
                                 <term><varname>ConditionSecurity=</varname></term>
                                 <term><varname>ConditionCapability=</varname></term>
                                 <term><varname>ConditionACPower=</varname></term>
                                 <term><varname>ConditionSecurity=</varname></term>
                                 <term><varname>ConditionCapability=</varname></term>
                                 <term><varname>ConditionACPower=</varname></term>
+                                <term><varname>ConditionNeedsUpdate=</varname></term>
                                 <term><varname>ConditionPathExists=</varname></term>
                                 <term><varname>ConditionPathExistsGlob=</varname></term>
                                 <term><varname>ConditionPathIsDirectory=</varname></term>
                                 <term><varname>ConditionPathExists=</varname></term>
                                 <term><varname>ConditionPathExistsGlob=</varname></term>
                                 <term><varname>ConditionPathIsDirectory=</varname></term>
                                 all AC connectors are disconnected
                                 from a power source.</para>
 
                                 all AC connectors are disconnected
                                 from a power source.</para>
 
+                                <para><varname>ConditionNeedsUpdate=</varname>
+                                takes one of <filename>/var</filename>
+                                or <filename>/etc</filename> as
+                                argument, possibly prefixed with a
+                                <literal>!</literal> (for inverting
+                                the condition). This condition may be
+                                used to conditionalize units on
+                                whether the specified directory
+                                requires an update because
+                                <filename>/usr</filename>'s
+                                modification time is newer than the
+                                stamp file
+                                <filename>.updated</filename> in the
+                                specified directory. This is useful to
+                                implement offline updates of the
+                                vendor operating system resources in
+                                <filename>/usr</filename> that require
+                                updating of <filename>/etc</filename>
+                                or <filename>/var</filename> on the
+                                next following boot. Units making use
+                                of this condition should order
+                                themselves before
+                                <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                                to make sure they run before the stamp
+                                files's modification time gets reset
+                                indicating a completed update.</para>
+
                                 <para>With
                                 <varname>ConditionPathExists=</varname>
                                 a file existence condition is
                                 <para>With
                                 <varname>ConditionPathExists=</varname>
                                 a file existence condition is