This commit is contained in:
Bob Mottram 2016-04-20 12:23:52 +01:00
parent 6d3943e23e
commit 395d6928e7
1 changed files with 151 additions and 151 deletions

View File

@ -1227,31 +1227,31 @@ function interactive_configuration {
44) DEBIAN_REPO='ftp.tw.debian.org';;
45) DEBIAN_REPO='ftp.th.debian.org';;
46) DEBIAN_REPO='ftp.tr.debian.org';;
47) DEBIAN_REPO='ftp.ua.debian.org';;
48) DEBIAN_REPO='ftp.uk.debian.org';;
49) DEBIAN_REPO='ftp.us.debian.org';;
255) exit 1;;
esac
save_configuration_file
else
DEBIAN_REPO='ftp.de.debian.org'
fi
47) DEBIAN_REPO='ftp.ua.debian.org';;
48) DEBIAN_REPO='ftp.uk.debian.org';;
49) DEBIAN_REPO='ftp.us.debian.org';;
255) exit 1;;
esac
save_configuration_file
else
DEBIAN_REPO='ftp.de.debian.org'
fi
if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Pick a domain name service (DNS):" 25 50 16 \
1 $"Digital Courage" on \
2 $"German Privacy Foundation 1" off \
3 $"German Privacy Foundation 2" off \
4 $"Chaos Computer Club" off \
5 $"ClaraNet" off \
6 $"OpenNIC 1" off \
7 $"OpenNIC 2" off \
8 $"OpenNIC 3" off \
9 $"OpenNIC 4" off \
10 $"OpenNIC 5" off \
if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Pick a domain name service (DNS):" 25 50 16 \
1 $"Digital Courage" on \
2 $"German Privacy Foundation 1" off \
3 $"German Privacy Foundation 2" off \
4 $"Chaos Computer Club" off \
5 $"ClaraNet" off \
6 $"OpenNIC 1" off \
7 $"OpenNIC 2" off \
8 $"OpenNIC 3" off \
9 $"OpenNIC 4" off \
10 $"OpenNIC 5" off \
11 $"OpenNIC 6" off \
12 $"OpenNIC 7" off \
13 $"PowerNS" off \
@ -1313,138 +1313,138 @@ esac
NAMESERVER2='4.4.4.4'
;;
255) exit 1;;
esac
save_configuration_file
else
# as defaults for a minimal install process these settings are debatable
NAMESERVER1='85.214.73.63'
NAMESERVER2='213.73.91.35'
fi
esac
save_configuration_file
else
# as defaults for a minimal install process these settings are debatable
NAMESERVER1='85.214.73.63'
NAMESERVER2='213.73.91.35'
fi
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" && $ONION_ONLY == "no" ]]; then
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" && $ONION_ONLY == "no" ]]; then
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Choose Dynamic DNS provider:" 15 40 14 \
1 dyndns off \
2 freedns on \
3 zoneedit off \
4 no-ip off \
5 easydns off \
6 tzo off \
7 3322 off \
8 dnsomatic off \
9 tunnelbroker off \
10 dns.he.net off \
11 dynsip off \
12 sitelutions off \
13 dnsexit off \
14 changeip off 2> $data
sel=$?
case $sel in
1) exit 1;;
255) exit 1;;
esac
case $(cat $data) in
1) DDNS_PROVIDER="default@dyndns.org";;
2) DDNS_PROVIDER="default@freedns.afraid.org";;
3) DDNS_PROVIDER="default@zoneedit.com";;
4) DDNS_PROVIDER="default@no-ip.com";;
5) DDNS_PROVIDER="default@easydns.com";;
6) DDNS_PROVIDER="default@tzo.com";;
7) DDNS_PROVIDER="dyndns@3322.org";;
8) DDNS_PROVIDER="default@dnsomatic.com";;
9) DDNS_PROVIDER="ipv6tb@he.net";;
10) DDNS_PROVIDER="dyndns@he.net";;
11) DDNS_PROVIDER="default@dynsip.org";;
12) DDNS_PROVIDER="default@sitelutions.com";;
13) DDNS_PROVIDER="default@dnsexit.com";;
14) DDNS_PROVIDER="default@changeip.com";;
255) exit 1;;
esac
save_configuration_file
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Choose Dynamic DNS provider:" 15 40 14 \
1 dyndns off \
2 freedns on \
3 zoneedit off \
4 no-ip off \
5 easydns off \
6 tzo off \
7 3322 off \
8 dnsomatic off \
9 tunnelbroker off \
10 dns.he.net off \
11 dynsip off \
12 sitelutions off \
13 dnsexit off \
14 changeip off 2> $data
sel=$?
case $sel in
1) exit 1;;
255) exit 1;;
esac
case $(cat $data) in
1) DDNS_PROVIDER="default@dyndns.org";;
2) DDNS_PROVIDER="default@freedns.afraid.org";;
3) DDNS_PROVIDER="default@zoneedit.com";;
4) DDNS_PROVIDER="default@no-ip.com";;
5) DDNS_PROVIDER="default@easydns.com";;
6) DDNS_PROVIDER="default@tzo.com";;
7) DDNS_PROVIDER="dyndns@3322.org";;
8) DDNS_PROVIDER="default@dnsomatic.com";;
9) DDNS_PROVIDER="ipv6tb@he.net";;
10) DDNS_PROVIDER="dyndns@he.net";;
11) DDNS_PROVIDER="default@dynsip.org";;
12) DDNS_PROVIDER="default@sitelutions.com";;
13) DDNS_PROVIDER="default@dnsexit.com";;
14) DDNS_PROVIDER="default@changeip.com";;
255) exit 1;;
esac
save_configuration_file
valid_ddns_username=
while [ ! $valid_ddns_username ]
do
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 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_username=$(cat $data)
if [ "$possible_username" ]; then
if [ ${#possible_username} -gt 1 ]; then
valid_ddns_username=$(cat $data)
DDNS_USERNAME=$valid_ddns_username
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
done
save_configuration_file
valid_ddns_username=
while [ ! $valid_ddns_username ]
do
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 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_username=$(cat $data)
if [ "$possible_username" ]; then
if [ ${#possible_username} -gt 1 ]; then
valid_ddns_username=$(cat $data)
DDNS_USERNAME=$valid_ddns_username
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
done
save_configuration_file
valid_ddns_password=
while [ ! $valid_ddns_password ]
do
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 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_password=$(cat $data)
if [ "$possible_password" ]; then
if [ ${#possible_password} -gt 1 ]; then
valid_ddns_password=$(cat $data)
DDNS_PASSWORD=$valid_ddns_password
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
dialog --title $"Password quality check" --msgbox $"The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
DDNS_PASSWORD=""
fi
done
save_configuration_file
fi
valid_ddns_password=
while [ ! $valid_ddns_password ]
do
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 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_password=$(cat $data)
if [ "$possible_password" ]; then
if [ ${#possible_password} -gt 1 ]; then
valid_ddns_password=$(cat $data)
DDNS_PASSWORD=$valid_ddns_password
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
dialog --title $"Password quality check" --msgbox $"The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
DDNS_PASSWORD=""
fi
done
save_configuration_file
fi
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
valid_name=
while [ ! $valid_name ]
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_name=$(cat $data)
if [ "$possible_name" ]; then
if [ ${#possible_name} -gt 1 ]; then
valid_name="$possible_name"
MY_NAME="$possible_name"
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
done
save_configuration_file
fi
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
valid_name=
while [ ! $valid_name ]
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) possible_name=$(cat $data)
if [ "$possible_name" ]; then
if [ ${#possible_name} -gt 1 ]; then
valid_name="$possible_name"
MY_NAME="$possible_name"
break;
fi
fi
;;
1) exit 1;;
255) exit 1;;
esac
done
save_configuration_file
fi
if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
SET_STATIC_IP="no"