2011-04-16 04:02:54 +04:00
<?xml version='1.0'?> <!-- * - nxml - * -->
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
Copyright 2010 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
2012-04-12 02:20:58 +04:00
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
2011-04-16 04:02:54 +04:00
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2012-04-12 02:20:58 +04:00
Lesser General Public License for more details.
2011-04-16 04:02:54 +04:00
2012-04-12 02:20:58 +04:00
You should have received a copy of the GNU Lesser General Public License
2011-04-16 04:02:54 +04:00
along with systemd; If not, see <http: / / w w w . g n u . o r g / l i c e n s e s /> .
-->
<refentry id= "machine-info" >
<refentryinfo >
<title > machine-info</title>
<productname > systemd</productname>
<authorgroup >
<author >
<contrib > Developer</contrib>
<firstname > Lennart</firstname>
<surname > Poettering</surname>
<email > lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta >
<refentrytitle > machine-info</refentrytitle>
<manvolnum > 5</manvolnum>
</refmeta>
<refnamediv >
<refname > machine-info</refname>
<refpurpose > Local machine information file</refpurpose>
</refnamediv>
<refsynopsisdiv >
<para > <filename > /etc/machine-info</filename> </para>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > The <filename > /etc/machine-info</filename> file
2014-02-17 06:37:18 +04:00
contains machine metadata.</para>
2011-04-16 04:02:54 +04:00
<para > The basic file format of
<filename > machine-info</filename> is a
newline-separated list of environment-like
shell-compatible variable assignments. It is possible
to source the configuration from shell scripts,
however, beyond mere variable assignments no shell
features are supported, allowing applications to read
the file without implementing a shell compatible
execution engine.</para>
<para > <filename > /etc/machine-info</filename> contains
2014-02-17 06:37:18 +04:00
metadata about the machine that is set by the user or
2011-04-16 04:02:54 +04:00
administrator.</para>
<para > Depending on the operating system other
configuration files might be checked for machine
information as well, however only as fallback.</para>
2012-10-17 23:23:30 +04:00
<para > You may use
<citerefentry > <refentrytitle > hostnamectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry>
to change the settings of this file from the command
line.</para>
2011-04-16 04:02:54 +04:00
</refsect1>
<refsect1 >
<title > Options</title>
2014-02-17 06:37:18 +04:00
<para > The following machine metadata parameters may
2011-04-16 04:02:54 +04:00
be set using
<filename > /etc/machine-info</filename> :</para>
<variablelist >
<varlistentry >
<term > <varname > PRETTY_HOSTNAME=</varname> </term>
<listitem > <para > A pretty
2013-09-12 23:12:49 +04:00
human-readable UTF-8 machine identifier
2011-04-16 04:02:54 +04:00
string. This should contain a name
like <literal > Lennart's
Laptop</literal> which is useful to
present to the user and does not
suffer by the syntax limitations of
2013-09-12 23:12:49 +04:00
internet domain names. If possible, the
2013-06-27 23:51:44 +04:00
internet hostname as configured in
2011-04-16 04:02:54 +04:00
<filename > /etc/hostname</filename>
should be kept similar to this
one. Example: if this value is
<literal > Lennart's Computer</literal>
2013-06-27 23:51:44 +04:00
an Internet hostname of
2011-04-16 04:02:54 +04:00
<literal > lennarts-computer</literal>
might be a good choice. If this
2013-09-12 23:12:49 +04:00
parameter is not set, an application
2011-04-16 04:02:54 +04:00
should fall back to the Internet host
name for presentation
purposes.</para> </listitem>
</varlistentry>
<varlistentry >
<term > <varname > ICON_NAME=</varname> </term>
<listitem > <para > An icon identifying
this machine according to the <ulink
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
Icon Naming Specification</ulink> . If
2013-09-12 23:12:49 +04:00
this parameter is not set, an
2011-04-16 04:02:54 +04:00
application should fall back to
<literal > computer</literal> or a
similar icon name.</para> </listitem>
</varlistentry>
2012-12-24 22:03:59 +04:00
<varlistentry >
<term > <varname > CHASSIS=</varname> </term>
<listitem > <para > The chassis
type. Currently, the following chassis
types are defined:
<literal > desktop</literal> ,
<literal > laptop</literal> ,
<literal > server</literal> ,
<literal > tablet</literal> ,
2014-07-09 15:37:50 +04:00
<literal > handset</literal> ,
<literal > watch</literal> , as well as
2012-12-24 22:03:59 +04:00
the special chassis types
<literal > vm</literal> and
<literal > container</literal> for
virtualized systems that lack an
immediate physical chassis. Note that
many systems allow detection of the
chassis type automatically (based on
firmware information or
suchlike). This setting (if set) shall
take precedence over automatically
detected information and is useful to
override misdetected configuration or
to manually configure the chassis type
where automatic detection is not
available.</para> </listitem>
</varlistentry>
2014-07-09 01:26:05 +04:00
<varlistentry >
<term > <varname > DEPLOYMENT=</varname> </term>
<listitem > <para > Describes the system
deployment environment. One of the
following is suggested:
<literal > development</literal> ,
<literal > integration</literal> ,
<literal > staging</literal> ,
<literal > production</literal> .
</para> </listitem>
</varlistentry>
2014-07-11 17:50:32 +04:00
<varlistentry >
<term > <varname > LOCATION=</varname> </term>
2014-07-09 01:26:05 +04:00
2014-07-11 17:50:32 +04:00
<listitem > <para > Describes the system
location if applicable and
known. Takes a human-friendly,
free-form string. This may be as
generic as <literal > Berlin,
Germany</literal> or as specific as
<literal > Left Rack, 2nd
Shelf</literal> .</para> </listitem>
</varlistentry>
2011-04-16 04:02:54 +04:00
</variablelist>
</refsect1>
<refsect1 >
<title > Example</title>
2012-12-24 22:03:59 +04:00
<programlisting > PRETTY_HOSTNAME="Lennart's Tablet"
ICON_NAME=computer-tablet
2014-07-09 01:26:05 +04:00
CHASSIS=tablet
DEPLOYMENT=production</programlisting>
2011-04-16 04:02:54 +04:00
</refsect1>
<refsect1 >
<title > See Also</title>
<para >
<citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > os-release</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > hostname</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
2012-10-17 23:23:30 +04:00
<citerefentry > <refentrytitle > machine-id</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > hostnamectl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > systemd-hostnamed.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry>
2011-04-16 04:02:54 +04:00
</para>
</refsect1>
</refentry>