chiark / gitweb /
tests: udev - assume /etc/machine-id rather than /etc/hosts
[elogind.git] / man / machine-info.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
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
25 <refentry id="machine-info">
26         <refentryinfo>
27                 <title>machine-info</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>machine-info</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>machine-info</refname>
47                 <refpurpose>Local machine information file</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>/etc/machine-info</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>The <filename>/etc/machine-info</filename> file
58                 contains machine metadata.</para>
59
60                 <para>The basic file format of
61                 <filename>machine-info</filename> is a
62                 newline-separated list of environment-like
63                 shell-compatible variable assignments. It is possible
64                 to source the configuration from shell scripts,
65                 however, beyond mere variable assignments no shell
66                 features are supported, allowing applications to read
67                 the file without implementing a shell compatible
68                 execution engine.</para>
69
70                 <para><filename>/etc/machine-info</filename> contains
71                 metadata about the machine that is set by the user or
72                 administrator.</para>
73
74                 <para>Depending on the operating system other
75                 configuration files might be checked for machine
76                 information as well, however only as fallback.</para>
77
78                 <para>You may use
79                 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
80                 to change the settings of this file from the command
81                 line.</para>
82         </refsect1>
83
84         <refsect1>
85                 <title>Options</title>
86
87                 <para>The following machine metadata parameters may
88                 be set using
89                 <filename>/etc/machine-info</filename>:</para>
90
91                 <variablelist>
92
93                         <varlistentry>
94                                 <term><varname>PRETTY_HOSTNAME=</varname></term>
95
96                                 <listitem><para>A pretty
97                                 human-readable UTF-8 machine identifier
98                                 string. This should contain a name
99                                 like <literal>Lennart's
100                                 Laptop</literal> which is useful to
101                                 present to the user and does not
102                                 suffer by the syntax limitations of
103                                 internet domain names. If possible, the
104                                 internet hostname as configured in
105                                 <filename>/etc/hostname</filename>
106                                 should be kept similar to this
107                                 one. Example: if this value is
108                                 <literal>Lennart's Computer</literal>
109                                 an Internet hostname of
110                                 <literal>lennarts-computer</literal>
111                                 might be a good choice. If this
112                                 parameter is not set, an application
113                                 should fall back to the Internet host
114                                 name for presentation
115                                 purposes.</para></listitem>
116                         </varlistentry>
117
118                         <varlistentry>
119                                 <term><varname>ICON_NAME=</varname></term>
120
121                                 <listitem><para>An icon identifying
122                                 this machine according to the <ulink
123                                 url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
124                                 Icon Naming Specification</ulink>. If
125                                 this parameter is not set, an
126                                 application should fall back to
127                                 <literal>computer</literal> or a
128                                 similar icon name.</para></listitem>
129                         </varlistentry>
130
131                         <varlistentry>
132                                 <term><varname>CHASSIS=</varname></term>
133
134                                 <listitem><para>The chassis
135                                 type. Currently, the following chassis
136                                 types are defined:
137                                 <literal>desktop</literal>,
138                                 <literal>laptop</literal>,
139                                 <literal>server</literal>,
140                                 <literal>tablet</literal>,
141                                 <literal>handset</literal>,
142                                 <literal>watch</literal>, as well as
143                                 the special chassis types
144                                 <literal>vm</literal> and
145                                 <literal>container</literal> for
146                                 virtualized systems that lack an
147                                 immediate physical chassis. Note that
148                                 many systems allow detection of the
149                                 chassis type automatically (based on
150                                 firmware information or
151                                 suchlike). This setting (if set) shall
152                                 take precedence over automatically
153                                 detected information and is useful to
154                                 override misdetected configuration or
155                                 to manually configure the chassis type
156                                 where automatic detection is not
157                                 available.</para></listitem>
158                         </varlistentry>
159
160                         <varlistentry>
161                                 <term><varname>DEPLOYMENT=</varname></term>
162
163                                 <listitem><para>Describes the system
164                                 deployment environment. One of the
165                                 following is suggested:
166                                 <literal>development</literal>,
167                                 <literal>integration</literal>,
168                                 <literal>staging</literal>,
169                                 <literal>production</literal>.
170                                 </para></listitem>
171                         </varlistentry>
172
173                         <varlistentry>
174                                 <term><varname>LOCATION=</varname></term>
175
176                                 <listitem><para>Describes the system
177                                 location if applicable and
178                                 known. Takes a human-friendly,
179                                 free-form string. This may be as
180                                 generic as <literal>Berlin,
181                                 Germany</literal> or as specific as
182                                 <literal>Left Rack, 2nd
183                                 Shelf</literal>.</para></listitem>
184                         </varlistentry>
185                 </variablelist>
186         </refsect1>
187
188         <refsect1>
189                 <title>Example</title>
190
191                 <programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
192 ICON_NAME=computer-tablet
193 CHASSIS=tablet
194 DEPLOYMENT=production</programlisting>
195         </refsect1>
196
197         <refsect1>
198                   <title>See Also</title>
199                   <para>
200                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
201                           <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
202                           <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
203                           <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
204                           <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
205                           <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
206                   </para>
207         </refsect1>
208
209 </refentry>