From e5a76fcf441790c7c52b90462af63671cc06ba83 Mon Sep 17 00:00:00 2001 From: Rarylson Freitas Date: Sun, 1 Aug 2021 17:21:50 -0300 Subject: [PATCH] Fix hostname inconsistencies during script execution When `--with-iou` and `--with-openvpn` are both enabled, hostname were updated in `/etc/hostname` but not on the running system (only changed after reboot). So the old hostname were used in MOTD and client OpenVPN config URL. --- scripts/remote-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/remote-install.sh b/scripts/remote-install.sh index 4cd40224..5c20c3a6 100644 --- a/scripts/remote-install.sh +++ b/scripts/remote-install.sh @@ -185,6 +185,8 @@ then # Force the host name to gns3vm echo gns3vm > /etc/hostname + hostname gns3vm + HOSTNAME=$(hostname) # Force hostid for IOU dd if=/dev/zero bs=4 count=1 of=/etc/hostid