This commit is contained in:
Bob Mottram 2016-10-09 11:33:11 +01:00
parent e4bb83835c
commit 3750bd9215
2 changed files with 18 additions and 54 deletions

View File

@ -1116,8 +1116,8 @@ function interactive_gpg {
255) exit 2;;
esac
case $(cat $data) in
1) if [ -d /home/$MY_USERNAME/.gnupg ]; then
rm -rf /home/$MY_USERNAME/.gnupg
1) if [ -d /home/${MY_USERNAME}/.gnupg ]; then
rm -rf /home/${MY_USERNAME}/.gnupg
fi
break;;
2) interactive_gpg_from_usb
@ -1408,51 +1408,11 @@ function show_result {
echo ''
}
function read_config {
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE='freedombone.cfg'
fi
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE='freedombone.cfg'
fi
if [ ! -f $CONFIGURATION_FILE ]; then
return
fi
read_config_param FRIENDS_MIRRORS_SERVER
read_config_param FRIENDS_MIRRORS_SSH_PORT
read_config_param FRIENDS_MIRRORS_PASSWORD
read_config_param ENABLE_SOCIAL_KEY_MANAGEMENT
read_config_param GIT_DOMAIN_NAME
read_config_param GIT_CODE
read_config_param MY_USERNAME
read_config_param DEFAULT_DOMAIN_NAME
read_config_param DEFAULT_DOMAIN_CODE
read_config_param NAMESERVER1
read_config_param NAMESERVER2
read_config_param DEBIAN_REPO
read_config_param DDNS_PROVIDER
read_config_param DDNS_USERNAME
read_config_param DDNS_PASSWORD
read_config_param LOCAL_NETWORK_STATIC_IP_ADDRESS
read_config_param ENABLE_CJDNS
read_config_param ENABLE_BATMAN
read_config_param ENABLE_BABEL
read_config_param ROUTER_IP_ADDRESS
read_config_param WIKI_TITLE
read_config_param MY_NAME
read_config_param MY_EMAIL_ADDRESS
read_config_param INSTALLING_ON_BBB
read_config_param USB_DRIVE
read_config_param PUBLIC_MAILING_LIST
read_config_param WIFI_SSID
read_config_param WIFI_INTERFACE
read_config_param WIFI_TYPE
read_config_param WIFI_PASSPHRASE
read_config_param BATMAN_CELLID
read_config_param WIFI_CHANNEL
read_config_param ONION_ONLY
}
read_config
read_configuration_values
interactive_config
show_result
exit 0

View File

@ -63,7 +63,7 @@ function write_config_param {
fi
}
function read_configuration {
function read_configuration_values {
# if not installing on a Beaglebone then use sdb as the USB drive by default
if [ ! $INSTALLING_ON_BBB ]; then
if [[ $USB_DRIVE == /dev/sda1 ]]; then
@ -71,13 +71,6 @@ function read_configuration {
fi
fi
if [[ $INSTALLING_FROM_CONFIGURATION_FILE == "yes" ]]; then
if [ ! -f $CONFIGURATION_FILE ]; then
echo $"The configuration file $CONFIGURATION_FILE was not found"
exit 8935
fi
fi
if [ -f $CONFIGURATION_FILE ]; then
read_repo_servers
@ -173,6 +166,17 @@ function read_configuration {
fi
}
function read_configuration {
if [[ $INSTALLING_FROM_CONFIGURATION_FILE == "yes" ]]; then
if [ ! -f $CONFIGURATION_FILE ]; then
echo $"The configuration file $CONFIGURATION_FILE was not found"
exit 8935
fi
fi
read_configuration_values
}
function check_system_type {
if [ ${#SYSTEM_TYPE} -eq 0 ]; then
echo $'Unknown system type'