From ce1d89c7411d79f94f5f2a9dab5d084b9cfda5eb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 26 Aug 2021 09:33:16 -0400 Subject: [PATCH] Set nodename as hostname prior to post for el class distros --- confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh | 2 ++ confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh b/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh index 5b6d5be8..51651124 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh @@ -12,6 +12,8 @@ export confluent_mgr confluent_profile nodename cp -a /etc/confluent /mnt/sysimage/etc chmod -R og-rwx /mnt/sysimage/etc/confluent cp /tmp/functions /mnt/sysimage/etc/confluent/ +hostnamectl set-hostname $nodename +cp /etc/hostname /mnt/sysimage/etc/hostname . /tmp/functions if [ -f /tmp/cryptboot ]; then cp /tmp/cryptboot /mnt/sysimage/tmp/ diff --git a/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh b/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh index 5b6d5be8..51651124 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh @@ -12,6 +12,8 @@ export confluent_mgr confluent_profile nodename cp -a /etc/confluent /mnt/sysimage/etc chmod -R og-rwx /mnt/sysimage/etc/confluent cp /tmp/functions /mnt/sysimage/etc/confluent/ +hostnamectl set-hostname $nodename +cp /etc/hostname /mnt/sysimage/etc/hostname . /tmp/functions if [ -f /tmp/cryptboot ]; then cp /tmp/cryptboot /mnt/sysimage/tmp/