This overrides the hostname from other sources, such as the nspawn
config file. Given we have DEFAULT_HOSTNAME= now, let's have users
use that and stop setting it explicitly ourselves.
if not any(s.startswith("SYSTEMD_SULOGIN_FORCE=") for s in config.kernel_command_line_extra):
cmdline += ["SYSTEMD_SULOGIN_FORCE=1"]
- if (
- not any(s.startswith("systemd.hostname=") for s in config.kernel_command_line_extra)
- and config.machine
- ):
- cmdline += [f"systemd.hostname={config.machine}"]
-
if args.verb != Verb.boot:
columns, lines = shutil.get_terminal_size()
term = finalize_term()