Make config more configurable and add sensible defaults

This commit is contained in:
Ani Balasubramaniam 2020-03-18 20:21:50 -07:00
parent 7194187c21
commit 8ce3b79422

30
config
View File

@ -1,8 +1,24 @@
export IMG_NAME=moab_fw # Override these values by setting FWVERSION, SERIAL, ROOTUSER
export TARGET_HOSTNAME=moab # and ROOTUSERPASS before invoking build(-docker).sh like so:
export LOCALE_DEFAULT=en_US.UTF-8 # FWVERSION=3 SERIAL=0001 ./build-docker.sh
export TIMEZONE_DEFAULT="America/Los_Angeles"
export DEFAULT_TIMEZONE=America/Los_Angeles export IMG_NAME="moab-fw-${FWVERSION:=dev}"
export FIRST_USER_NAME=pi echo "IMG_NAME is $IMG_NAME"
export FIRST_USER_PASS="raspberry"
export TARGET_HOSTNAME="moab-${SERIAL:=dev}"
echo "TARGET_HOSTNAME is $TARGET_HOSTNAME"
TIMEZONE=$(cat /etc/timezone)
export TIMEZONE_DEFAULT=$TIMEZONE
echo "TIMEZONE_DEFAULT is $TIMEZONE_DEFAULT"
export LOCALE_DEFAULT=$(cat /etc/default/locale)
echo "LOCALE_DEFAULT is $LOCALE_DEFAULT"
export FIRST_USER_NAME=${ROOTUSER:="pi"}
echo "ROOTUSER is $FIRST_USER_NAME"
export FIRST_USER_PASS=${ROOTUSERPASS:="raspberry"}
echo "FIRST_USER_PASS is $ROOTUSERPASS"
export ENABLE_SSH=1 export ENABLE_SSH=1