Debian Codegraph @

man/systemd-update-done.service.xml

raw
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-update-done.service" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>systemd-update-done.service</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd-update-done.service</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd-update-done.service</refname>
20 <refname>systemd-update-done</refname>
21 <refpurpose>Mark <filename>/etc/</filename> and <filename>/var/</filename> as fully updated</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename>systemd-update-done.service</filename></para>
26 <para><filename>/usr/lib/systemd/systemd-update-done</filename></para>
27 </refsynopsisdiv>
28
29 <refsect1>
30 <title>Description</title>
31
32 <para><filename>systemd-update-done.service</filename> is a
33 service that is invoked as part of the first boot after the vendor
34 operating system resources in <filename>/usr/</filename> have been
35 updated. This is useful to implement offline updates of
36 <filename>/usr/</filename> which might require updates to
37 <filename>/etc/</filename> or <filename>/var/</filename> on the
38 following boot.</para>
39
40 <para><filename>systemd-update-done.service</filename> updates the file modification time (mtime) stored
41 in and "on" the files <filename>/etc/.updated</filename> and <filename>/var/.updated</filename> to the
42 modification time of the <filename>/usr/</filename> directory, unless the stamp files are already newer.
43 (The timestamp is stored as the mtime field on the file, but also <emphasis>in</emphasis> the file
44 to support filesystems that do not store full timestamp precision.)</para>
45
46 <para>Services that shall run after offline upgrades of
47 <filename>/usr/</filename> should order themselves before
48 <filename>systemd-update-done.service</filename>, and use the
49 <varname>ConditionNeedsUpdate=</varname> (see
50 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
51 condition to make sure to run when <filename>/etc/</filename> or
52 <filename>/var/</filename> are older than <filename>/usr/</filename>
53 according to the modification times of the files described above.
54 This requires that updates to <filename>/usr/</filename> are always
55 followed by an update of the modification time of
56 <filename>/usr/</filename>, for example by invoking
57 <citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry>
58 on it.</para>
59
60 <para>Note that if the <varname>systemd.condition_needs_update=</varname> kernel command line option is
61 used it overrides the <varname>ConditionNeedsUpdate=</varname> unit condition checks. In that case
62 <filename>systemd-update-done.service</filename> will not reset the condition state until a follow-up
63 reboot where the kernel switch is not specified anymore.</para>
64 </refsect1>
65
66 <refsect1>
67 <title>Options</title>
68
69 <para>The following options are understood:</para>
70
71 <variablelist>
72 <varlistentry>
73 <term><option>--root=<replaceable>root</replaceable></option></term>
74 <listitem><para>Takes a directory path as an argument. The program
75 will operate on paths below the specified root directory.
76 </para>
77
78 <xi:include href="version-info.xml" xpointer="v258"/></listitem>
79 </varlistentry>
80
81 <xi:include href="standard-options.xml" xpointer="help" />
82 <xi:include href="standard-options.xml" xpointer="version" />
83 </variablelist>
84 </refsect1>
85
86 <refsect1>
87 <title>See Also</title>
88 <para><simplelist type="inline">
89 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
90 <member><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
91 <member><citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
92 </simplelist></para>
93 </refsect1>
94
95 </refentry>