diff mbox series

[OSSTEST,31/36] ts-debian-*-install: Replace dots in hostnames by dashs

Message ID 20240318165545.3898-32-anthony.perard@citrix.com (mailing list archive)
State New
Headers show
Series Switch to Debian Bookworm | expand

Commit Message

Anthony PERARD March 18, 2024, 4:55 p.m. UTC
When running ./ts-debian-di-install, hostname on the command line is
interpreted by the debian installer. As the installer find it to be a
FQDN, it uses part of the hostname as the domain, thus overwriting the
value from the DHCP and from d-i netcfg/get_domain setting (maybe).

But the result is that /etc/resolv.conf contains "search
bookworm.guest.osstest" and can't find an IP for "cache". So the
installation fails.

Also replace ".guest.osstest" in a few other places, even if it
may not be an issue.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 ts-debian-di-install  | 4 ++--
 ts-debian-hvm-install | 2 +-
 ts-debian-install     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/ts-debian-di-install b/ts-debian-di-install
index d84407cf..06c7e1f4 100755
--- a/ts-debian-di-install
+++ b/ts-debian-di-install
@@ -68,8 +68,8 @@  our $ram_mb= $r{arch} =~ m/^armhf/ ? 768 : 2048;
 our $disk_mb= 10000;
 
 our $guesthost= $gn.
-    ($r{"${gn}_suite"} ? ".".$r{"${gn}_suite"} : "").
-    ".guest.osstest";
+    ($r{"${gn}_suite"} ? "-".$r{"${gn}_suite"} : "").
+    "-guest-osstest";
 our $gho;
 
 sub prep () {
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 60c95b37..99e9acae 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -46,7 +46,7 @@  our $ho= selecthost($whhost);
 our $ram_mb;
 our $disk_mb= 10000;
 
-our $guesthost= "$gn.guest.osstest";
+our $guesthost= "$gn-guest-osstest";
 our $gho;
 
 our ($kernel, $ramdisk);
diff --git a/ts-debian-install b/ts-debian-install
index a737bec9..62db487a 100755
--- a/ts-debian-install
+++ b/ts-debian-install
@@ -34,7 +34,7 @@  our $ram_mb=    512;
 our $swap_mb=  1000;
 our $disk_mb= 10000;
 
-our $guesthost= "$gn.guest.osstest";
+our $guesthost= "$gn-guest-osstest";
 our $gho;
 
 sub prep () {