[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [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.
-- 
2.21.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]