last hostname

This commit is contained in:
psklenar@redhat.com 2024-09-02 19:26:53 +02:00
commit 4dc3cf4ad5

View file

@ -31,7 +31,11 @@ prepareIpaServer()
fi
rlRun "dnf -y install freeipa-server-dns"
HOSTNAME=`hostname --all-fqdns | awk '{print $NF}'`
ORIG_HOSTNAME=${HOSTNAME}
# there is longer name at AWS, more than 64char
hostnamectl set-hostname ipa.ipa
HOSTNAME=`hostname|tail -n1`
# not needed after change ^
if echo $HOSTNAME | grep '\.'
then
rlLog "Using full hostname $HOSTNAME"