diff --git a/man/freedombone-image.1.gz b/man/freedombone-image.1.gz index e00ea81f..497cc86f 100644 Binary files a/man/freedombone-image.1.gz and b/man/freedombone-image.1.gz differ diff --git a/src/freedombone-image b/src/freedombone-image index 828015c7..001a983c 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -118,6 +118,9 @@ WIFI_PASSPHRASE= WIFI_HOTSPOT='no' WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg +# Whether to install non-free wifi drivers for the mesh client +INSECURE='no' + mesh_router_setup_script() { # create a setup script for a mesh router mesh_script_filename=$1 @@ -265,6 +268,10 @@ do shift WIFI_NETWORKS_FILE="$1" ;; + --insecure) + shift + INSECURE="$1" + ;; *) # unknown option ;; @@ -376,7 +383,8 @@ make $IMAGE_TYPE \ WIFI_HOTSPOT="$WIFI_HOTSPOT" \ WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \ VARIANT="$VARIANT" \ - MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH" + MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH" \ + INSECURE="$INSECURE" if [ ! "$?" = "0" ]; then echo $'Build failed' diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 8647447a..612c738b 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -91,6 +91,9 @@ WIFI_PASSPHRASE= WIFI_HOTSPOT='no' WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg +# Whether to install non-free wifi drivers for the mesh client +INSECURE='no' + enable_eatmydata_override() { chroot $rootdir apt-get install --no-install-recommends -y eatmydata if [ -x $rootdir/usr/bin/eatmydata ] && \ @@ -963,6 +966,23 @@ initialise_mesh() { return fi + if [[ $INSECURE == $'yes' ]]; then + echo '*********************************************************' + echo $'WARNING: non-free wifi drivers are being installed.' + echo $' This may compromise the security of your system.' + echo '*********************************************************' + + # enable non-free repo + if ! grep -q "non-free" $rootdir/etc/apt/sources.list; then + chroot "$rootdir" sed -i "s| main| main non-free|g" /etc/apt/sources.list + chroot "$rootdir" apt-get update + fi + + # install proprietary wifi drivers + # see https://wiki.debian.org/iwlwifi + chroot "$rootdir" apt-get -y install firmware-iwlwifi + fi + mesh_firewall mesh_avahi mesh_batman diff --git a/src/freedombone-image-make b/src/freedombone-image-make index bdb21489..25ab91aa 100755 --- a/src/freedombone-image-make +++ b/src/freedombone-image-make @@ -64,6 +64,7 @@ export WIFI_HOTSPOT export WIFI_NETWORKS_FILE export VARIANT export MINIMUM_PASSWORD_LENGTH +export INSECURE # Locate vmdebootstrap program fetched in Makefile basedir=`pwd` @@ -197,6 +198,7 @@ sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMI 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 sudo sed -i "s|MINIMUM_PASSWORD_LENGTH=.*|MINIMUM_PASSWORD_LENGTH=\"${MINIMUM_PASSWORD_LENGTH}\"|g" $TEMP_CUSTOMISE +sudo sed -i "s|INSECURE=.*|INSECURE=\"${INSECURE}\"|g" $TEMP_CUSTOMISE echo $"starting $VMDEBOOTSTRAP" # Run vmdebootstrap script to create image