]>
Commit | Line | Data |
---|---|---|
7caa86ac LP |
1 | <?xml version="1.0"?> |
2 | <!--*-nxml-*--> | |
3a54a157 | 3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
eea10b26 | 4 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
db9ecf05 | 5 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
7caa86ac LP |
6 | <refentry id="systemd-update-done.service"> |
7 | ||
798d3a52 ZJS |
8 | <refentryinfo> |
9 | <title>systemd-update-done.service</title> | |
10 | <productname>systemd</productname> | |
798d3a52 ZJS |
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> | |
3b121157 | 21 | <refpurpose>Mark <filename>/etc/</filename> and <filename>/var/</filename> fully updated</refpurpose> |
798d3a52 ZJS |
22 | </refnamediv> |
23 | ||
24 | <refsynopsisdiv> | |
25 | <para><filename>systemd-update-done.service</filename></para> | |
12b42c76 | 26 | <para><filename>/usr/lib/systemd/systemd-update-done</filename></para> |
798d3a52 ZJS |
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 | |
3b121157 | 34 | operating system resources in <filename>/usr/</filename> have been |
798d3a52 | 35 | updated. This is useful to implement offline updates of |
3b121157 ZJS |
36 | <filename>/usr/</filename> which might require updates to |
37 | <filename>/etc/</filename> or <filename>/var/</filename> on the | |
798d3a52 ZJS |
38 | following boot.</para> |
39 | ||
40 | <para><filename>systemd-update-done.service</filename> updates the | |
41 | file modification time (mtime) of the stamp files | |
42 | <filename>/etc/.updated</filename> and | |
43 | <filename>/var/.updated</filename> to the modification time of the | |
3b121157 | 44 | <filename>/usr/</filename> directory, unless the stamp files are |
798d3a52 ZJS |
45 | already newer.</para> |
46 | ||
47 | <para>Services that shall run after offline upgrades of | |
3b121157 | 48 | <filename>/usr/</filename> should order themselves before |
798d3a52 ZJS |
49 | <filename>systemd-update-done.service</filename>, and use the |
50 | <varname>ConditionNeedsUpdate=</varname> (see | |
51 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>) | |
3b121157 ZJS |
52 | condition to make sure to run when <filename>/etc/</filename> or |
53 | <filename>/var/</filename> are older than <filename>/usr/</filename> | |
798d3a52 | 54 | according to the modification times of the files described above. |
3b121157 | 55 | This requires that updates to <filename>/usr/</filename> are always |
798d3a52 | 56 | followed by an update of the modification time of |
3b121157 | 57 | <filename>/usr/</filename>, for example by invoking |
798d3a52 ZJS |
58 | <citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
59 | on it.</para> | |
60 | ||
78266a54 | 61 | <para>Note that if the <varname>systemd.condition_needs_update=</varname> kernel command line option is |
f8b4ae29 LP |
62 | used it overrides the <varname>ConditionNeedsUpdate=</varname> unit condition checks. In that case |
63 | <filename>systemd-update-done.service</filename> will not reset the condition state until a follow-up | |
64 | reboot where the kernel switch is not specified anymore.</para> | |
798d3a52 ZJS |
65 | </refsect1> |
66 | ||
67 | <refsect1> | |
68 | <title>See Also</title> | |
13a69c12 DT |
69 | <para><simplelist type="inline"> |
70 | <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
71 | <member><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> | |
72 | <member><citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
73 | </simplelist></para> | |
798d3a52 | 74 | </refsect1> |
7caa86ac LP |
75 | |
76 | </refentry> |