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.
This commit is contained in:
Rarylson Freitas committed 2021-08-01 17:49:27 -03:00
1 parent d926a713b9
commit e5a76fcf44
1 file changed
+2
+2
View File
@@ -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