summaryrefslogtreecommitdiff
path: root/man/machine-info.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-12-24 19:03:59 +0100
committerLennart Poettering <lennart@poettering.net>2012-12-24 19:03:59 +0100
commit7871c8e9327e4e5b18de9d8081b0f32fa38c2c1f (patch)
tree56dea3f21fcc707ac392696697a50d18c21a09d5 /man/machine-info.xml
parentf9ea108e7c3544c03822277a1112a48dc62f6ed4 (diff)
downloadsystemd-7871c8e9327e4e5b18de9d8081b0f32fa38c2c1f.tar.gz
hostnamed: make chassis type configurable via /etc/machine-info
For many usecases it is useful to store the chassis type somewhere, and /etc/machine-info sounds like a good place. Ideally we could always detect the chassis type from firmware, but frequently that's not available and in many embedded devices probably entirely unrealistic. This patch adds a configurable setting CHASSIS= to /etc/machine-info and exposes this via hostnamectl/hostnamed. hostnamed will guess the chassis type from DMI if nothing is set explicitly. I also added support for detecting it from ACPI, which should be more useful as ACPI 5.0 actually knows a "tablet" chassis type, which neither DMI nor previous ACPI versions knew. This also enables DMI-based and ACPI-based detection for non-x86 systems as ACPI is apparently coming to ARM platforms soon. I tried to minimize the vocabulary of chassis types understood and added: desktop, laptop, server, tablet, handset. This is much less than either APCI or DMI know. If we need more types later on we can easily add them.
Diffstat (limited to 'man/machine-info.xml')
-rw-r--r--man/machine-info.xml33
1 files changed, 31 insertions, 2 deletions
diff --git a/man/machine-info.xml b/man/machine-info.xml
index b310d71334..1c3a21c643 100644
--- a/man/machine-info.xml
+++ b/man/machine-info.xml
@@ -128,6 +128,34 @@
similar icon name.</para></listitem>
</varlistentry>
+ <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>,
+ <literal>handset</literal>, as well as
+ 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>
+
</variablelist>
</refsect1>
@@ -135,8 +163,9 @@
<refsect1>
<title>Example</title>
- <programlisting>PRETTY_HOSTNAME="Lennart's Computer"
-ICON_NAME=computer-laptop</programlisting>
+ <programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
+ICON_NAME=computer-tablet
+CHASSIS=tablet</programlisting>
</refsect1>
<refsect1>