From 6eab27f1de6fcec285c83546a1399343e0cf94c7 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 12 Dec 2019 09:19:05 -0500 Subject: [PATCH] Setup - fix iso hostname --- setup/functions.sh | 9 +++++++++ setup/so-setup.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/setup/functions.sh b/setup/functions.sh index 017932834..ef8409df1 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -1171,6 +1171,15 @@ set_hostname() { } +set_hostname_iso() { + + hostnamectl set-hostname --static $HOSTNAME + echo "127.0.0.1 $HOSTNAME $HOSTNAME.localdomain localhost localhost.localdomain localhost4 localhost4.localdomain" > /etc/hosts + echo "::1 localhost localhost.localdomain localhost6 localhost6.localdomain6" >> /etc/hosts + echo $HOSTNAME > /etc/hostname + +} + set_initial_firewall_policy() { get_main_ip diff --git a/setup/so-setup.sh b/setup/so-setup.sh index 3570fc940..57f75c015 100644 --- a/setup/so-setup.sh +++ b/setup/so-setup.sh @@ -98,7 +98,7 @@ if (whiptail_you_sure) ; then fi # Go ahead and bring up networking so other parts of the install work - set_hostname + set_hostname_iso set_management_interface # Add an admin user