1
0
Fork 0

Fix hostname

This commit is contained in:
Braiden Vasco 2017-07-01 01:33:24 +00:00
parent 970e0cea27
commit 1a0a789ed8
4 changed files with 10 additions and 2 deletions

View file

@ -128,6 +128,11 @@ if [ -z "${IMG_NAME}" ]; then
exit 1 exit 1
fi fi
if [ -z "${HOSTNAME}" ]; then
echo "HOSTNAME not set" 1>&2
exit 1
fi
export IMG_DATE=${IMG_DATE:-"$(date +%Y-%m-%d)"} export IMG_DATE=${IMG_DATE:-"$(date +%Y-%m-%d)"}
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@ -138,6 +143,7 @@ export LOG_FILE="${WORK_DIR}/build.log"
export CLEAN export CLEAN
export IMG_NAME export IMG_NAME
export HOSTNAME
export APT_PROXY export APT_PROXY
export STAGE export STAGE

1
config
View file

@ -1 +1,2 @@
IMG_NAME='BarnacleOS' IMG_NAME='BarnacleOS'
HOSTNAME='barnacleos'

View file

@ -2,7 +2,9 @@
install -m 644 files/ipv6.conf ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf install -m 644 files/ipv6.conf ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf
install -m 644 files/interfaces ${ROOTFS_DIR}/etc/network/interfaces install -m 644 files/interfaces ${ROOTFS_DIR}/etc/network/interfaces
install -m 644 files/hostname ${ROOTFS_DIR}/etc/hostname
echo $HOSTNAME >${ROOTFS_DIR}/etc/hostname
chmod 644 ${ROOTFS_DIR}/etc/hostname
on_chroot << EOF on_chroot << EOF
dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules

View file

@ -1 +0,0 @@
raspberrypi