From 7871c8e9327e4e5b18de9d8081b0f32fa38c2c1f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 Dec 2012 19:03:59 +0100 Subject: 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. --- man/hostnamectl.xml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'man/hostnamectl.xml') diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml index c36f522c8..a29d2f5b7 100644 --- a/man/hostnamectl.xml +++ b/man/hostnamectl.xml @@ -80,8 +80,8 @@ The static host name is stored in /etc/hostname, see hostname5 - for more information. The pretty host name and icon - name are stored in + for more information. The pretty host name, chassis + type and icon name are stored in /etc/machine-info, see machine-id5. @@ -198,8 +198,34 @@ Naming Specification. Pass an empty string to this operation to reset the icon name to the default + value which is determined from chassis + type (see below) and possibly other + parameters. + + + + set-chassis [TYPE] + + Set the chassis + type. The chassis type is used by some + graphical applications to visualize + the host or alter user + interaction. Currently, the following + chassis types are defined: + desktop, + laptop, + server, + tablet, + handset, as well as + the special chassis types + vm and + container for + virtualized systems that lack an + immediate physical chassis. Pass an + empty string to this operation to + reset the chassis type to the default value which is determined from the - system form factor and possibly other + firmware and possibly other parameters. -- cgit v1.2.3