]>
Commit | Line | Data |
---|---|---|
7640a5de | 1 | <?xml version='1.0'?> <!--*-nxml-*--> |
7640a5de | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
7640a5de LP |
4 | |
5 | <!-- | |
572eb058 ZJS |
6 | SPDX-License-Identifier: LGPL-2.1+ |
7 | ||
7640a5de LP |
8 | This file is part of systemd. |
9 | ||
10 | Copyright 2010 Lennart Poettering | |
11 | ||
12 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
13 | under the terms of the GNU Lesser General Public License as published by |
14 | the Free Software Foundation; either version 2.1 of the License, or | |
7640a5de LP |
15 | (at your option) any later version. |
16 | ||
17 | systemd is distributed in the hope that it will be useful, but | |
18 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 20 | Lesser General Public License for more details. |
7640a5de | 21 | |
5430f7f2 | 22 | You should have received a copy of the GNU Lesser General Public License |
7640a5de LP |
23 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
24 | --> | |
25 | ||
26 | <refentry id="machine-info"> | |
798d3a52 ZJS |
27 | <refentryinfo> |
28 | <title>machine-info</title> | |
29 | <productname>systemd</productname> | |
30 | ||
31 | <authorgroup> | |
32 | <author> | |
33 | <contrib>Developer</contrib> | |
34 | <firstname>Lennart</firstname> | |
35 | <surname>Poettering</surname> | |
36 | <email>lennart@poettering.net</email> | |
37 | </author> | |
38 | </authorgroup> | |
39 | </refentryinfo> | |
40 | ||
41 | <refmeta> | |
42 | <refentrytitle>machine-info</refentrytitle> | |
43 | <manvolnum>5</manvolnum> | |
44 | </refmeta> | |
45 | ||
46 | <refnamediv> | |
47 | <refname>machine-info</refname> | |
48 | <refpurpose>Local machine information file</refpurpose> | |
49 | </refnamediv> | |
50 | ||
51 | <refsynopsisdiv> | |
52 | <para><filename>/etc/machine-info</filename></para> | |
53 | </refsynopsisdiv> | |
54 | ||
55 | <refsect1> | |
56 | <title>Description</title> | |
57 | ||
58 | <para>The <filename>/etc/machine-info</filename> file contains | |
59 | machine metadata.</para> | |
60 | ||
61 | <para>The basic file format of <filename>machine-info</filename> | |
62 | is a newline-separated list of environment-like shell-compatible | |
63 | variable assignments. It is possible to source the configuration | |
64 | from shell scripts, however, beyond mere variable assignments no | |
65 | shell features are supported, allowing applications to read the | |
66 | file without implementing a shell compatible execution | |
67 | engine.</para> | |
68 | ||
69 | <para><filename>/etc/machine-info</filename> contains metadata | |
70 | about the machine that is set by the user or administrator.</para> | |
71 | ||
72 | <para>Depending on the operating system other configuration files | |
73 | might be checked for machine information as well, however only as | |
74 | fallback.</para> | |
75 | ||
76 | <para>You may use | |
77 | <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
78 | to change the settings of this file from the command line.</para> | |
79 | </refsect1> | |
80 | ||
81 | <refsect1> | |
82 | <title>Options</title> | |
83 | ||
84 | <para>The following machine metadata parameters may be set using | |
85 | <filename>/etc/machine-info</filename>:</para> | |
86 | ||
87 | <variablelist> | |
88 | ||
89 | <varlistentry> | |
90 | <term><varname>PRETTY_HOSTNAME=</varname></term> | |
91 | ||
92 | <listitem><para>A pretty human-readable UTF-8 machine | |
93 | identifier string. This should contain a name like | |
94 | <literal>Lennart's Laptop</literal> which is useful to present | |
95 | to the user and does not suffer by the syntax limitations of | |
96 | internet domain names. If possible, the internet hostname as | |
97 | configured in <filename>/etc/hostname</filename> should be | |
98 | kept similar to this one. Example: if this value is | |
99 | <literal>Lennart's Computer</literal> an Internet hostname of | |
100 | <literal>lennarts-computer</literal> might be a good choice. | |
101 | If this parameter is not set, an application should fall back | |
102 | to the Internet host name for presentation | |
103 | purposes.</para></listitem> | |
104 | </varlistentry> | |
105 | ||
106 | <varlistentry> | |
107 | <term><varname>ICON_NAME=</varname></term> | |
108 | ||
109 | <listitem><para>An icon identifying this machine according to | |
110 | the <ulink | |
111 | url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG | |
112 | Icon Naming Specification</ulink>. If this parameter is not | |
113 | set, an application should fall back to | |
114 | <literal>computer</literal> or a similar icon | |
115 | name.</para></listitem> | |
116 | </varlistentry> | |
117 | ||
118 | <varlistentry> | |
119 | <term><varname>CHASSIS=</varname></term> | |
120 | ||
121 | <listitem><para>The chassis type. Currently, the following | |
122 | chassis types are defined: | |
123 | <literal>desktop</literal>, | |
124 | <literal>laptop</literal>, | |
34b52450 | 125 | <literal>convertible</literal>, |
798d3a52 ZJS |
126 | <literal>server</literal>, |
127 | <literal>tablet</literal>, | |
128 | <literal>handset</literal>, | |
129 | <literal>watch</literal>, and | |
b938cb90 | 130 | <literal>embedded</literal>, |
798d3a52 ZJS |
131 | as well as the special chassis types |
132 | <literal>vm</literal> and | |
133 | <literal>container</literal> for | |
134 | virtualized systems that lack an immediate physical chassis. | |
135 | Note that many systems allow detection of the chassis type | |
136 | automatically (based on firmware information or suchlike). | |
137 | This setting (if set) shall take precedence over automatically | |
138 | detected information and is useful to override misdetected | |
139 | configuration or to manually configure the chassis type where | |
140 | automatic detection is not available.</para></listitem> | |
141 | </varlistentry> | |
142 | ||
143 | <varlistentry> | |
144 | <term><varname>DEPLOYMENT=</varname></term> | |
145 | ||
146 | <listitem><para>Describes the system deployment environment. | |
147 | One of the following is suggested: | |
148 | <literal>development</literal>, | |
149 | <literal>integration</literal>, | |
150 | <literal>staging</literal>, | |
151 | <literal>production</literal>. | |
152 | </para></listitem> | |
153 | </varlistentry> | |
154 | ||
155 | <varlistentry> | |
156 | <term><varname>LOCATION=</varname></term> | |
157 | ||
158 | <listitem><para>Describes the system location if applicable | |
159 | and known. Takes a human-friendly, free-form string. This may | |
160 | be as generic as <literal>Berlin, Germany</literal> or as | |
161 | specific as <literal>Left Rack, 2nd Shelf</literal>. | |
162 | </para></listitem> | |
163 | </varlistentry> | |
164 | </variablelist> | |
165 | </refsect1> | |
166 | ||
167 | <refsect1> | |
168 | <title>Example</title> | |
169 | ||
170 | <programlisting>PRETTY_HOSTNAME="Lennart's Tablet" | |
7871c8e9 | 171 | ICON_NAME=computer-tablet |
799298d6 JG |
172 | CHASSIS=tablet |
173 | DEPLOYMENT=production</programlisting> | |
798d3a52 ZJS |
174 | </refsect1> |
175 | ||
176 | <refsect1> | |
177 | <title>See Also</title> | |
178 | <para> | |
179 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
180 | <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
181 | <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
182 | <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
183 | <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
184 | <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
185 | </para> | |
186 | </refsect1> | |
7640a5de LP |
187 | |
188 | </refentry> |