From 9dad900bccb51047e18e0f70356b6f8d5899ae7a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 17 Jan 2015 22:23:03 +0000 Subject: [PATCH] Dynamic DNS details --- src/freedombone | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/freedombone b/src/freedombone index 7e3cda5d..256ae3ac 100755 --- a/src/freedombone +++ b/src/freedombone @@ -383,7 +383,6 @@ function interactive_configuration { --defaultno \ --yesno "\nAre you installing onto a Beaglebone Black?" 7 60 sel=$? - echo "Result $sel" case $sel in 0) INSTALLING_ON_BBB="yes";; 1) INSTALLING_ON_BBB="no";; @@ -425,6 +424,38 @@ function interactive_configuration { 255) exit 0;; esac + data=$(tempfile 2>/dev/null) + trap "rm -f $data" 0 1 2 5 15 + dialog --backtitle "Freedombone Configuration" \ + --inputbox "Dynamic DNS provider username" 10 30 2> $data + sel=$? + case $sel in + 0) DDNS_USERNAME=$data;; + 1) exit 0;; + 255) exit 0;; + esac + if [[ $DDNS_USERNAME=="" ]]; then + exit 5245 + fi + + data=$(tempfile 2>/dev/null) + trap "rm -f $data" 0 1 2 5 15 + dialog --backtitle "Freedombone Configuration" \ + --clear \ + --insecure \ + --passwordbox "Dynamic DNS provider password" 10 30 2> $data + sel=$? + case $sel in + 0) DDNS_PASSWORD=$data;; + 1) exit 0;; + 255) exit 0;; + esac + data=$(tempfile 2>/dev/null) + trap "rm -f $data" 0 1 2 5 15 + if [[ $DDNS_PASSWORD=="" ]]; then + exit 7229 + fi + exit 0 }