]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Stop setting hostname via kernel command line 4183/head
authorDaan De Meyer <daan@amutable.com>
Thu, 19 Feb 2026 13:00:52 +0000 (14:00 +0100)
committerDaan De Meyer <daan@amutable.com>
Thu, 19 Feb 2026 13:04:24 +0000 (14:04 +0100)
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.

mkosi/qemu.py

index 60db6e01e78fa1e08bb8342844b49c3ba52a4ba6..dc84644c9cfc2b2c4b9e90c40b7f9f3dd1cd2b53 100644 (file)
@@ -789,12 +789,6 @@ def finalize_kernel_command_line_extra(args: Args, config: Config) -> list[str]:
     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()