Rename HOSTNAME variable to TARGET_HOSTNAME

Bash sets the HOSTNAME variable, overriding our default
This commit is contained in:
Serge Schneider
2019-12-05 16:25:18 +00:00
parent f8f3d6fe93
commit 24bb01dec2
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash -e
echo "${HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
echo "127.0.1.1 ${HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"
echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"
ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"