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 This file is part of systemd.
9 Copyright 2014 Lennart Poettering
11 <refentry id=
"systemd-update-done.service">
14 <title>systemd-update-done.service
</title>
15 <productname>systemd
</productname>
19 <contrib>Developer
</contrib>
20 <firstname>Lennart
</firstname>
21 <surname>Poettering
</surname>
22 <email>lennart@poettering.net
</email>
28 <refentrytitle>systemd-update-done.service
</refentrytitle>
29 <manvolnum>8</manvolnum>
33 <refname>systemd-update-done.service
</refname>
34 <refname>systemd-update-done
</refname>
35 <refpurpose>Mark
<filename>/etc
</filename> and
<filename>/var
</filename> fully updated
</refpurpose>
39 <para><filename>systemd-update-done.service
</filename></para>
40 <para><filename>/usr/lib/systemd/systemd-update-done
</filename></para>
44 <title>Description
</title>
46 <para><filename>systemd-update-done.service
</filename> is a
47 service that is invoked as part of the first boot after the vendor
48 operating system resources in
<filename>/usr
</filename> have been
49 updated. This is useful to implement offline updates of
50 <filename>/usr
</filename> which might require updates to
51 <filename>/etc
</filename> or
<filename>/var
</filename> on the
52 following boot.
</para>
54 <para><filename>systemd-update-done.service
</filename> updates the
55 file modification time (mtime) of the stamp files
56 <filename>/etc/.updated
</filename> and
57 <filename>/var/.updated
</filename> to the modification time of the
58 <filename>/usr
</filename> directory, unless the stamp files are
61 <para>Services that shall run after offline upgrades of
62 <filename>/usr
</filename> should order themselves before
63 <filename>systemd-update-done.service
</filename>, and use the
64 <varname>ConditionNeedsUpdate=
</varname> (see
65 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
66 condition to make sure to run when
<filename>/etc
</filename> or
67 <filename>/var
</filename> are older than
<filename>/usr
</filename>
68 according to the modification times of the files described above.
69 This requires that updates to
<filename>/usr
</filename> are always
70 followed by an update of the modification time of
71 <filename>/usr
</filename>, for example by invoking
72 <citerefentry project='man-pages'
><refentrytitle>touch
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
78 <title>See Also
</title>
80 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
81 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
82 <citerefentry project='man-pages'
><refentrytitle>touch
</refentrytitle><manvolnum>1</manvolnum></citerefentry>