Optionally install proprietary firmware for wifi on mesh variants
This commit is contained in:
parent
201d2cb0ca
commit
48cee051ab
Binary file not shown.
|
@ -118,6 +118,9 @@ WIFI_PASSPHRASE=
|
||||||
WIFI_HOTSPOT='no'
|
WIFI_HOTSPOT='no'
|
||||||
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
||||||
|
|
||||||
|
# Whether to install non-free wifi drivers for the mesh client
|
||||||
|
INSECURE='no'
|
||||||
|
|
||||||
mesh_router_setup_script() {
|
mesh_router_setup_script() {
|
||||||
# create a setup script for a mesh router
|
# create a setup script for a mesh router
|
||||||
mesh_script_filename=$1
|
mesh_script_filename=$1
|
||||||
|
@ -265,6 +268,10 @@ do
|
||||||
shift
|
shift
|
||||||
WIFI_NETWORKS_FILE="$1"
|
WIFI_NETWORKS_FILE="$1"
|
||||||
;;
|
;;
|
||||||
|
--insecure)
|
||||||
|
shift
|
||||||
|
INSECURE="$1"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# unknown option
|
# unknown option
|
||||||
;;
|
;;
|
||||||
|
@ -376,7 +383,8 @@ make $IMAGE_TYPE \
|
||||||
WIFI_HOTSPOT="$WIFI_HOTSPOT" \
|
WIFI_HOTSPOT="$WIFI_HOTSPOT" \
|
||||||
WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
|
WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
|
||||||
VARIANT="$VARIANT" \
|
VARIANT="$VARIANT" \
|
||||||
MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH"
|
MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH" \
|
||||||
|
INSECURE="$INSECURE"
|
||||||
|
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo $'Build failed'
|
echo $'Build failed'
|
||||||
|
|
|
@ -91,6 +91,9 @@ WIFI_PASSPHRASE=
|
||||||
WIFI_HOTSPOT='no'
|
WIFI_HOTSPOT='no'
|
||||||
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
||||||
|
|
||||||
|
# Whether to install non-free wifi drivers for the mesh client
|
||||||
|
INSECURE='no'
|
||||||
|
|
||||||
enable_eatmydata_override() {
|
enable_eatmydata_override() {
|
||||||
chroot $rootdir apt-get install --no-install-recommends -y eatmydata
|
chroot $rootdir apt-get install --no-install-recommends -y eatmydata
|
||||||
if [ -x $rootdir/usr/bin/eatmydata ] && \
|
if [ -x $rootdir/usr/bin/eatmydata ] && \
|
||||||
|
@ -963,6 +966,23 @@ initialise_mesh() {
|
||||||
return
|
return
|
||||||
fi
|
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_firewall
|
||||||
mesh_avahi
|
mesh_avahi
|
||||||
mesh_batman
|
mesh_batman
|
||||||
|
|
|
@ -64,6 +64,7 @@ export WIFI_HOTSPOT
|
||||||
export WIFI_NETWORKS_FILE
|
export WIFI_NETWORKS_FILE
|
||||||
export VARIANT
|
export VARIANT
|
||||||
export MINIMUM_PASSWORD_LENGTH
|
export MINIMUM_PASSWORD_LENGTH
|
||||||
|
export INSECURE
|
||||||
|
|
||||||
# Locate vmdebootstrap program fetched in Makefile
|
# Locate vmdebootstrap program fetched in Makefile
|
||||||
basedir=`pwd`
|
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|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|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|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"
|
echo $"starting $VMDEBOOTSTRAP"
|
||||||
# Run vmdebootstrap script to create image
|
# Run vmdebootstrap script to create image
|
||||||
|
|
Loading…
Reference in New Issue