Use the DEFAULT_HOSTNAME field from os-release
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Feb 2021 16:48:20 +0000 (17:48 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Feb 2021 19:10:55 +0000 (20:10 +0100)
commite7637751c4d3dbdaf9e5e13801d912389c8b7f4d
treedbebbf9607feaa983f36744871c5ccffadfcdc31
parent05c6f341b1fc18f59293d115bb4cbee94f8bf3a1
Use the DEFAULT_HOSTNAME field from os-release

This provides a fairly comprehensible fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1893417.

This adds yet-another level of configuration:
- /etc/hostname
- transient hostname
- $SYSTEMD_DEFAULT_HOSTNAME
- DEFAULT_HOSTNAME is os-release
- -Dfallback-hostname=
- "linux"

It's a lot of layers, but each has it's own justification.
src/basic/hostname-util.c