]>
Commit | Line | Data |
---|---|---|
2a5a41e8 DR |
1 | <?xml version="1.0"?> |
2 | <!--*-nxml-*--> | |
12b42c76 | 3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
2a5a41e8 | 4 | <!-- |
572eb058 ZJS |
5 | SPDX-License-Identifier: LGPL-2.1+ |
6 | ||
2a5a41e8 DR |
7 | This file is part of systemd. |
8 | ||
9 | Copyright 2014 Didier Roche | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
12 | under the terms of the GNU Lesser General Public License as published by | |
13 | the Free Software Foundation; either version 2.1 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public License | |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
23 | --> | |
24 | <refentry id="systemd-machine-id-commit.service"> | |
25 | ||
798d3a52 ZJS |
26 | <refentryinfo> |
27 | <title>systemd-machine-id-commit.service</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Didier</firstname> | |
34 | <surname>Roche</surname> | |
35 | <email>didrocks@ubuntu.com</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd-machine-id-commit.service</refentrytitle> | |
42 | <manvolnum>8</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd-machine-id-commit.service</refname> | |
a8eaaee7 | 47 | <refpurpose>Commit a transient machine ID to disk</refpurpose> |
798d3a52 ZJS |
48 | </refnamediv> |
49 | ||
50 | <refsynopsisdiv> | |
51 | <para><filename>systemd-machine-id-commit.service</filename></para> | |
798d3a52 ZJS |
52 | </refsynopsisdiv> |
53 | ||
54 | <refsect1> | |
55 | <title>Description</title> | |
56 | ||
4a9b1dd4 | 57 | <para><filename>systemd-machine-id-commit.service</filename> is an |
b938cb90 | 58 | early boot service responsible for committing transient |
4a9b1dd4 | 59 | <filename>/etc/machine-id</filename> files to a writable disk file |
798d3a52 ZJS |
60 | system. See |
61 | <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
4a9b1dd4 LP |
62 | for more information about machine IDs.</para> |
63 | ||
64 | <para>This service is started after | |
65 | <filename>local-fs.target</filename> in case | |
66 | <filename>/etc/machine-id</filename> is a mount point of its own | |
67 | (usually from a memory file system such as | |
68 | <literal>tmpfs</literal>) and /etc is writable. The service will | |
69 | invoke <command>systemd-machine-id-setup --commit</command>, which | |
70 | writes the current transient machine ID to disk and unmount the | |
798d3a52 | 71 | <filename>/etc/machine-id</filename> file in a race-free manner to |
4a9b1dd4 LP |
72 | ensure that file is always valid and accessible for other |
73 | processes. See | |
74 | <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
75 | for details.</para> | |
76 | ||
77 | <para>The main use case of this service are systems where | |
78 | <filename>/etc/machine-id</filename> is read-only and initially | |
b938cb90 | 79 | not initialized. In this case, the system manager will generate a |
4a9b1dd4 LP |
80 | transient machine ID file on a memory file system, and mount it |
81 | over <filename>/etc/machine-id</filename>, during the early boot | |
82 | phase. This service is then invoked in a later boot phase, as soon | |
83 | as <filename>/etc</filename> has been remounted writable and the | |
84 | ID may thus be committed to disk to make it permanent.</para> | |
798d3a52 ZJS |
85 | </refsect1> |
86 | ||
87 | <refsect1> | |
88 | <title>See Also</title> | |
89 | <para> | |
90 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
798d3a52 ZJS |
91 | <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
92 | <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
93 | <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
94 | </para> | |
95 | </refsect1> | |
2a5a41e8 DR |
96 | |
97 | </refentry> |