diff options
| author | Rene Klootwijk <rene@klootwijk.org> | 2019-10-26 12:49:30 +0200 |
|---|---|---|
| committer | XECDesign <XECDesign@users.noreply.github.com> | 2019-11-05 17:21:33 +0000 |
| commit | d30343f626916a5b6f23cec67df919bd5a5b643a (patch) | |
| tree | 5ebb1522f6300f4e4eb0cb14ec496ad45c948d18 | |
| parent | 19c0188798f39149e5a82f70a3f96b96cfdaa7d9 (diff) | |
Added hostname parameter
| -rw-r--r-- | README.md | 6 | ||||
| -rwxr-xr-x | build.sh | 2 | ||||
| -rwxr-xr-x | stage1/02-net-tweaks/00-run.sh | 2 | ||||
| -rw-r--r-- | stage1/02-net-tweaks/files/hostname | 1 |
4 files changed, 8 insertions, 3 deletions
@@ -62,7 +62,7 @@ The following environment variables are supported: be built and cached. Note, `WORK_DIR` stores a complete copy of the target system for each build stage, amounting to tens of gigabytes in the case of Raspbian. - + **CAUTION**: If your working directory is on an NTFS partition you probably won't be able to build. Make sure this is a proper Linux filesystem. * `DEPLOY_DIR` (Default: `"$BASE_DIR/deploy"`) @@ -82,6 +82,10 @@ The following environment variables are supported: Default system locale. + * `HOSTNAME` (Default: "raspberrypi" ) + + Setting the hostname to the specified value. + * `KEYBOARD_KEYMAP` (Default: "gb" ) Default keyboard keymap. @@ -161,6 +161,8 @@ 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 FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry} export WPA_ESSID diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh index a49b4b0..8637edc 100755 --- a/stage1/02-net-tweaks/00-run.sh +++ b/stage1/02-net-tweaks/00-run.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -install -m 644 files/hostname "${ROOTFS_DIR}/etc/hostname" +echo "${HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link" diff --git a/stage1/02-net-tweaks/files/hostname b/stage1/02-net-tweaks/files/hostname deleted file mode 100644 index 41757af..0000000 --- a/stage1/02-net-tweaks/files/hostname +++ /dev/null @@ -1 +0,0 @@ -raspberrypi |
