From a83bf3e8cab46959a1f7f292cf4a1202862bb2c5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 28 May 2016 13:42:50 +0100 Subject: [PATCH] Set variant during image build --- src/freedombone-image | 3 ++- src/freedombone-image-customise | 4 +++- src/freedombone-image-make | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image b/src/freedombone-image index 616dfcd9..f334e343 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -362,7 +362,8 @@ make $IMAGE_TYPE \ WIFI_TYPE="$WIFI_TYPE" \ WIFI_PASSPHRASE="$WIFI_PASSPHRASE" \ WIFI_HOTSPOT="$WIFI_HOTSPOT" \ - WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" + WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \ + VARIANT="$VARIANT" if [ ! "$?" = "0" ]; then echo $'Build failed' diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 4a91f5ed..0b2dcee3 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -35,6 +35,8 @@ COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt PROJECT_REPO="https://github.com/bashrc/${PROJECT_NAME}" +VARIANT='full' + # username created by default within a debian image GENERIC_IMAGE_USERNAME='fbone' @@ -230,7 +232,6 @@ create_generic_image() { if [[ $GENERIC_IMAGE == "no" ]]; then return fi - VARIANT="full" if [ $CONFIG_FILENAME ]; then if [[ "$CONFIG_FILENAME" == *"mesh.cfg"* ]]; then VARIANT="mesh" @@ -888,6 +889,7 @@ initialise_mesh() { if [[ $VARIANT != "mesh" || $DEBIAN_INSTALL_ONLY != "no" ]]; then return fi + mesh_firewall mesh_avahi mesh_batman diff --git a/src/freedombone-image-make b/src/freedombone-image-make index 7b394ed9..78fcb2fe 100755 --- a/src/freedombone-image-make +++ b/src/freedombone-image-make @@ -62,6 +62,7 @@ export WIFI_TYPE export WIFI_PASSPHRASE export WIFI_HOTSPOT export WIFI_NETWORKS_FILE +export VARIANT # Locate vmdebootstrap program fetched in Makefile basedir=`pwd` @@ -183,6 +184,7 @@ sudo sed -i "s|WIFI_TYPE=.*|WIFI_TYPE=\"${WIFI_TYPE}\"|g" $TEMP_CUSTOMISE sudo sed -i "s|WIFI_PASSPHRASE=.*|WIFI_PASSPHRASE=\"${WIFI_PASSPHRASE}\"|g" $TEMP_CUSTOMISE sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMISE sudo sed -i "s|WIFI_NETWORKS_FILE=.*|WIFI_NETWORKS_FILE=\"${WIFI_NETWORKS_FILE}\"|g" $TEMP_CUSTOMISE +sudo sed -i "s|VARIANT=.*|VARIANT=\"${VARIANT}\"|g" $TEMP_CUSTOMISE echo $"starting $VMDEBOOTSTRAP" # Run vmdebootstrap script to create image