1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2014 Didier Roche
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd-machine-id-commit"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>systemd-machine-id-commit</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Didier</firstname>
35 <surname>Roche</surname>
36 <email>didrocks@ubuntu.com</email>
42 <refentrytitle>systemd-machine-id-commit</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>systemd-machine-id-commit</refname>
48 <refpurpose>Commit transient machine ID to /etc/machine-id</refpurpose>
53 <command>systemd-machine-id-commit</command>
58 <title>Description</title>
60 <para><command>systemd-machine-id-commit</command> may
61 be used to write on disk any transient machine ID
62 mounted as a temporary file system in
63 <filename>/etc/machine-id</filename> at boot time. See
64 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65 for more information about this file.</para>
67 <para>This tool will execute no operation if
68 <filename>/etc/machine-id</filename> doesn't contain any
69 valid machine ID, isn't mounted as an independent temporary
70 file system, of <filename>/etc</filename> is read-only. If
71 those conditions are met, it will then write current machine ID
72 to disk and unmount the transient
73 <filename>/etc/machine-id</filename> file in a race-free
74 manner to ensure that this file is always valid for other
77 <para>Note that the traditional way to initialize the machine
78 ID in <filename>/etc/machine-id</filename> is to use
79 <command>systemd-machine-id-setup</command> by system
80 installer tools. You can also use
81 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
82 to initialize the machine ID on mounted (but not
83 booted) system images.</para>
87 <title>Options</title>
89 <para>The following options are understood:</para>
93 <term><option>--root=<replaceable>root</replaceable></option></term>
94 <listitem><para>Takes a directory path
95 as an argument. All paths will be
96 prefixed with the given alternate
97 <replaceable>root</replaceable> path,
98 including config search paths.
101 <xi:include href="standard-options.xml" xpointer="help" />
102 <xi:include href="standard-options.xml" xpointer="version" />
108 <title>Exit status</title>
110 <para>On success, 0 is returned, a non-zero failure
111 code otherwise.</para>
115 <title>See Also</title>
117 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
118 <citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
119 <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
120 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
121 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>