machine-info.xml revision 799298d6513e7d40125c19d46578bb870d047db4
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering<?xml version='1.0'?> <!--*-nxml-*-->
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering<!--
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering This file is part of systemd.
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering Copyright 2010 Lennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering under the terms of the GNU Lesser General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering (at your option) any later version.
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering systemd is distributed in the hope that it will be useful, but
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Lesser General Public License for more details.
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering You should have received a copy of the GNU Lesser General Public License
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering-->
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering<refentry id="machine-info">
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refentryinfo>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <title>machine-info</title>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <productname>systemd</productname>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <authorgroup>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <author>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <contrib>Developer</contrib>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <firstname>Lennart</firstname>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <surname>Poettering</surname>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <email>lennart@poettering.net</email>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </author>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </authorgroup>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refentryinfo>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refmeta>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refentrytitle>machine-info</refentrytitle>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <manvolnum>5</manvolnum>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refmeta>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refnamediv>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refname>machine-info</refname>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refpurpose>Local machine information file</refpurpose>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refnamediv>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refsynopsisdiv>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para><filename>/etc/machine-info</filename></para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refsynopsisdiv>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <title>Description</title>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para>The <filename>/etc/machine-info</filename> file
66f756d437658cc464bfb5647c97efd0cf77f933Jan Engelhardt contains machine metadata.</para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para>The basic file format of
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <filename>machine-info</filename> is a
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering newline-separated list of environment-like
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering shell-compatible variable assignments. It is possible
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering to source the configuration from shell scripts,
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering however, beyond mere variable assignments no shell
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering features are supported, allowing applications to read
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering the file without implementing a shell compatible
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering execution engine.</para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para><filename>/etc/machine-info</filename> contains
66f756d437658cc464bfb5647c97efd0cf77f933Jan Engelhardt metadata about the machine that is set by the user or
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering administrator.</para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para>Depending on the operating system other
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering configuration files might be checked for machine
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering information as well, however only as fallback.</para>
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering <para>You may use
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering to change the settings of this file from the command
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering line.</para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <title>Options</title>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
66f756d437658cc464bfb5647c97efd0cf77f933Jan Engelhardt <para>The following machine metadata parameters may
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering be set using
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <filename>/etc/machine-info</filename>:</para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <variablelist>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <varlistentry>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <term><varname>PRETTY_HOSTNAME=</varname></term>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <listitem><para>A pretty
79640424059328268b9fb6c5fa8eb777b27a177eJan Engelhardt human-readable UTF-8 machine identifier
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering string. This should contain a name
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering like <literal>Lennart's
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering Laptop</literal> which is useful to
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering present to the user and does not
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering suffer by the syntax limitations of
79640424059328268b9fb6c5fa8eb777b27a177eJan Engelhardt internet domain names. If possible, the
e9dd9f9547350c7dc0473583b5c2228dc8f0ab76Jason St. John internet hostname as configured in
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <filename>/etc/hostname</filename>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering should be kept similar to this
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering one. Example: if this value is
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <literal>Lennart's Computer</literal>
e9dd9f9547350c7dc0473583b5c2228dc8f0ab76Jason St. John an Internet hostname of
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <literal>lennarts-computer</literal>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering might be a good choice. If this
79640424059328268b9fb6c5fa8eb777b27a177eJan Engelhardt parameter is not set, an application
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering should fall back to the Internet host
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering name for presentation
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering purposes.</para></listitem>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </varlistentry>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <varlistentry>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <term><varname>ICON_NAME=</varname></term>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <listitem><para>An icon identifying
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering this machine according to the <ulink
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering Icon Naming Specification</ulink>. If
79640424059328268b9fb6c5fa8eb777b27a177eJan Engelhardt this parameter is not set, an
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering application should fall back to
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <literal>computer</literal> or a
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering similar icon name.</para></listitem>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </varlistentry>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <varlistentry>
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <term><varname>CHASSIS=</varname></term>
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <listitem><para>The chassis
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering type. Currently, the following chassis
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering types are defined:
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>desktop</literal>,
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>laptop</literal>,
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>server</literal>,
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>tablet</literal>,
efab8d0b0ebf6d715949b7af66fecaf5e5e5d77bTomasz Torcz <literal>handset</literal>,
efab8d0b0ebf6d715949b7af66fecaf5e5e5d77bTomasz Torcz <literal>watch</literal>, as well as
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering the special chassis types
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>vm</literal> and
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <literal>container</literal> for
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering virtualized systems that lack an
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering immediate physical chassis. Note that
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering many systems allow detection of the
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering chassis type automatically (based on
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering firmware information or
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering suchlike). This setting (if set) shall
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering take precedence over automatically
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering detected information and is useful to
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering override misdetected configuration or
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering to manually configure the chassis type
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering where automatic detection is not
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering available.</para></listitem>
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering </varlistentry>
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <varlistentry>
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <term><varname>DEPLOYMENT=</varname></term>
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <listitem><para>Describes the system
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson deployment environment. One of the
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson following is suggested:
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <literal>development</literal>,
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <literal>integration</literal>,
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <literal>staging</literal>,
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson <literal>production</literal>.
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson </para></listitem>
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson </varlistentry>
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. Guðmundsson
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </variablelist>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <title>Example</title>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart Poettering <programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
7871c8e9327e4e5b18de9d8081b0f32fa38c2c1fLennart PoetteringICON_NAME=computer-tablet
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. GuðmundssonCHASSIS=tablet
799298d6513e7d40125c19d46578bb870d047db4Jóhann B. GuðmundssonDEPLOYMENT=production</programlisting>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <title>See Also</title>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
dbc4fbae58e39cb0d33738f0a4d1e74511ed1fb5Lennart Poettering <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </para>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering </refsect1>
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poettering</refentry>