From 02890096d55eaee66c1e6ed34fc9b235cc64ebd3 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 26 Sep 2019 13:32:50 +0200 Subject: [PATCH] builder: templates: set "unassigned" hostname By default the installer will set the hostname to what the DHCP returns, exposing details of the machine where make-template.ml runs. Instead, force "unassigned-hostname.unassigned-domain" as hostname, so plays nicely with the hostname setting code in virt-customize. --- builder/templates/debian.preseed | 2 +- builder/templates/ubuntu.preseed | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/templates/debian.preseed b/builder/templates/debian.preseed index 1f13eadbd..8c51fa7f9 100644 --- a/builder/templates/debian.preseed +++ b/builder/templates/debian.preseed @@ -71,7 +71,7 @@ d-i netcfg/get_domain string unassigned-domain # If you want to force a hostname, regardless of what either the DHCP # server returns or what the reverse DNS entry for the IP is, uncomment # and adjust the following line. -#d-i netcfg/hostname string somehost +d-i netcfg/hostname string unassigned-hostname.unassigned-domain # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string diff --git a/builder/templates/ubuntu.preseed b/builder/templates/ubuntu.preseed index 236e17497..595d897a6 100644 --- a/builder/templates/ubuntu.preseed +++ b/builder/templates/ubuntu.preseed @@ -47,6 +47,11 @@ d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain +# If you want to force a hostname, regardless of what either the DHCP +# server returns or what the reverse DNS entry for the IP is, uncomment +# and adjust the following line. +d-i netcfg/hostname string unassigned-hostname.unassigned-domain + # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string # The wacky dhcp hostname that some ISPs use as a password of sorts.