TT#51600 Use hostname from ip= if install from puppet

HOSTNAME env variable is not set from 'ip=' but seems to be set
outside of deployment.sh script and exported to it. HOSTNAME
variable is set differently if newer grml20181230 is set in
dnsmasq dhcp.conf. We have 'ip=' option where we explicitly set
hostname for the host so let's use it (instead of uncontrolled
HOSTNAME variable) for puppet installation case.

Change-Id: I3fa2cc7ec982b270302d2d0940d6477b666eaf5c
changes/00/27100/2
Sergii Kipot 6 years ago
parent cb784693cb
commit 9adc963405

@ -2091,9 +2091,9 @@ puppet_install_from_puppet () {
set_deploy_status "puppet"
echo "Setting hostname to $TARGET_HOSTNAME"
echo "$TARGET_HOSTNAME" > ${TARGET}/etc/hostname
grml-chroot $TARGET hostname -F /etc/hostname
echo "Setting hostname to ${IP_ARR[hostname]}"
echo "${IP_ARR[hostname]}" > "${TARGET}/etc/hostname"
grml-chroot "$TARGET" hostname -F /etc/hostname
chroot $TARGET apt-get -y install resolvconf libnss-myhostname

Loading…
Cancel
Save