From d3d60e5f74235b1cc29284eddc158237c7528068 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 5 Sep 2015 18:16:51 +0100 Subject: [PATCH] Spacing of wifi channels --- src/freedombone-config | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/freedombone-config b/src/freedombone-config index 92a8f436..649c1a43 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -158,7 +158,7 @@ function save_configuration_file { echo "DEFAULT_DOMAIN_NAME=$DEFAULT_DOMAIN_NAME" >> $CONFIGURATION_FILE if [ $DEFAULT_DOMAIN_CODE ]; then echo "DEFAULT_DOMAIN_CODE=$DEFAULT_DOMAIN_CODE" >> $CONFIGURATION_FILE - fi +1 fi echo "SYSTEM_TYPE=$SYSTEM_TYPE" >> $CONFIGURATION_FILE echo "INSTALLING_ON_BBB=$INSTALLING_ON_BBB" >> $CONFIGURATION_FILE echo "USB_DRIVE=$USB_DRIVE" >> $CONFIGURATION_FILE @@ -574,6 +574,27 @@ function interactive_configuration { DEFAULT_DOMAIN_NAME=$(hostname) fi save_configuration_file + + data=$(tempfile 2>/dev/null) + trap "rm -f $data" 0 1 2 5 15 + dialog --backtitle "Freedombone Configuration" \ + --radiolist "Wifi Channel (spaced to be non-overlapping):" 11 50 4 \ + 1 "1" on \ + 2 "5" off \ + 3 "9" off \ + 4 "13" off 2> $data + sel=$? + case $sel in + 1) exit 1;; + 255) exit 1;; + esac + case $(cat $data) in + 1) WIFI_CHANNEL=1;; + 2) WIFI_CHANNEL=5;; + 3) WIFI_CHANNEL=9;; + 4) WIFI_CHANNEL=13;; + esac + save_configuration_file fi #if [[ $ENABLE_BATMAN == "yes" ]]; then