3 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 SPDX-License-Identifier: LGPL-2.1+
7 <refentry id=
"systemd-update-done.service">
10 <title>systemd-update-done.service
</title>
11 <productname>systemd
</productname>
15 <refentrytitle>systemd-update-done.service
</refentrytitle>
16 <manvolnum>8</manvolnum>
20 <refname>systemd-update-done.service
</refname>
21 <refname>systemd-update-done
</refname>
22 <refpurpose>Mark
<filename>/etc
</filename> and
<filename>/var
</filename> fully updated
</refpurpose>
26 <para><filename>systemd-update-done.service
</filename></para>
27 <para><filename>/usr/lib/systemd/systemd-update-done
</filename></para>
31 <title>Description
</title>
33 <para><filename>systemd-update-done.service
</filename> is a
34 service that is invoked as part of the first boot after the vendor
35 operating system resources in
<filename>/usr
</filename> have been
36 updated. This is useful to implement offline updates of
37 <filename>/usr
</filename> which might require updates to
38 <filename>/etc
</filename> or
<filename>/var
</filename> on the
39 following boot.
</para>
41 <para><filename>systemd-update-done.service
</filename> updates the
42 file modification time (mtime) of the stamp files
43 <filename>/etc/.updated
</filename> and
44 <filename>/var/.updated
</filename> to the modification time of the
45 <filename>/usr
</filename> directory, unless the stamp files are
48 <para>Services that shall run after offline upgrades of
49 <filename>/usr
</filename> should order themselves before
50 <filename>systemd-update-done.service
</filename>, and use the
51 <varname>ConditionNeedsUpdate=
</varname> (see
52 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
53 condition to make sure to run when
<filename>/etc
</filename> or
54 <filename>/var
</filename> are older than
<filename>/usr
</filename>
55 according to the modification times of the files described above.
56 This requires that updates to
<filename>/usr
</filename> are always
57 followed by an update of the modification time of
58 <filename>/usr
</filename>, for example by invoking
59 <citerefentry project='man-pages'
><refentrytitle>touch
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
65 <title>See Also
</title>
67 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
68 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
69 <citerefentry project='man-pages'
><refentrytitle>touch
</refentrytitle><manvolnum>1</manvolnum></citerefentry>