Browse Source

Selectable mesh network protocol

Bob Mottram 10 years ago
parent
commit
cbf4fa9760
1 changed files with 20 additions and 1 deletions
  1. 20
    1
      src/freedombone-config

+ 20
- 1
src/freedombone-config View File

@@ -508,9 +508,28 @@ function interactive_configuration {
508 508
   save_configuration_file
509 509
 
510 510
   if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
511
-      ENABLE_BATMAN="yes"
511
+      ENABLE_BATMAN="no"
512 512
       ENABLE_CJDNS="no"
513 513
       ENABLE_BABEL="no"
514
+
515
+      data=$(tempfile 2>/dev/null)
516
+      trap "rm -f $data" 0 1 2 5 15
517
+      dialog --backtitle "Freedombone Configuration" \
518
+             --radiolist "Select your type of mesh network:" 10 40 3 \
519
+             1 "Babel" off \
520
+             2 "B.A.T.M.A.N. Advanced" on \
521
+             3 "cjdns" off 2> $data
522
+      sel=$?
523
+      case $sel in
524
+          1) exit 1;;
525
+          255) exit 1;;
526
+      esac
527
+      case $(cat $data) in
528
+          1) ENABLE_BABEL="yes";;
529
+          2) ENABLE_BATMAN="yes";;
530
+          3) ENABLE_CJDNS="yes";;
531
+      esac
532
+      save_configuration_file
514 533
   fi
515 534
 
516 535
   data=$(tempfile 2>/dev/null)