Commit 24bb01de authored by Serge Schneider's avatar Serge Schneider
Browse files

Rename HOSTNAME variable to TARGET_HOSTNAME

Bash sets the HOSTNAME variable, overriding our default
parent f8f3d6fe
......@@ -82,7 +82,7 @@ The following environment variables are supported:
Default system locale.
* `HOSTNAME` (Default: "raspberrypi" )
* `TARGET_HOSTNAME` (Default: "raspberrypi" )
Setting the hostname to the specified value.
......
......@@ -162,7 +162,7 @@ export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
export LOG_FILE="${WORK_DIR}/build.log"
export HOSTNAME=${HOSTNAME:-raspberrypi}
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}
export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry}
......
#!/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"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment