systemd/man/systemd-machine-id-commit.html
2015-02-17 11:22:16 +01:00

53 lines
5.1 KiB
HTML

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-machine-id-commit</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-machine-id-commit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machine-id-commit — Commit transient machine ID to /etc/machine-id</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-machine-id-commit</code> </p></div></div><div class="refsect1"><a name="idm140198987842880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>systemd-machine-id-commit</strong></span> may be used to
write on disk any transient machine ID mounted as a temporary file
system in <code class="filename">/etc/machine-id</code> at boot time. See
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
for more information about this file.</p><p>This tool will execute no operation if
<code class="filename">/etc/machine-id</code> doesn't contain any valid
machine ID, isn't mounted as an independent temporary file system,
of <code class="filename">/etc</code> is read-only. If those conditions are
met, it will then write current machine ID to disk and unmount the
transient <code class="filename">/etc/machine-id</code> file in a race-free
manner to ensure that this file is always valid for other
processes.</p><p>Note that the traditional way to initialize the machine ID
in <code class="filename">/etc/machine-id</code> is to use
<span class="command"><strong>systemd-machine-id-setup</strong></span> by system installer
tools. You can also use
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to initialize the machine ID on mounted (but not booted) system
images.</p></div><div class="refsect1"><a name="idm140198987834048"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root"></a></dt><dd><p>Takes a directory path
as an argument. All paths will be
prefixed with the given alternate
<em class="replaceable"><code>root</code></em> path,
including config search paths.
</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm140198987828416"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure code
otherwise.</p></div><div class="refsect1"><a name="idm140198991729776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-machine-id-commit.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-commit.service</span>(8)</span></a>,
<a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
</p></div></div></body></html>