From addddf565b982ba35cf2be290fb1a5e036f2567f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 19 Feb 2021 15:08:07 +0100 Subject: [PATCH] os-release: add the DEFAULT_HOSTNAME= setting The motivation is that variants of the same distro that share the same compiled rpm want to customize various aspects of the system, in particular the hostname. In some sense the default hostname is part of the identity of the system, so setting it through os-release makes sense. In particular, instead of setting a default value in /etc/hostname, the appropriate default can be baked into the image, leaving /etc/hostname for local overrides only. Why make this a separate field instead of e.g. using NAME from os-release? NAME is already used for other purposes, and it seems likely that people want to set those independently. --- man/os-release.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/man/os-release.xml b/man/os-release.xml index 5a0cfd2887c..a6d333f2780 100644 --- a/man/os-release.xml +++ b/man/os-release.xml @@ -317,6 +317,23 @@ + + DEFAULT_HOSTNAME= + + A string specifying the hostname if + hostname5 is not + present and no other configuration source specifies the hostname. Must be either a single DNS label + (a string composed of 7-bit ASCII lower-case characters and no spaces or dots, limited to the format + allowed for DNS domain name labels), or a sequence of such labels separated by single dots that forms + a valid DNS FQDN. The total length must be at most 64 characters. + + See + org.freedesktop.hostname15 + for a description of how + systemd-hostnamed.service8 + determines the fallback hostname. + + SYSEXT_LEVEL=