Skip to content
Snippets Groups Projects
Commit 3750bd92 authored by Bob Mottram's avatar Bob Mottram
Browse files

Tidying

parent e4bb8383
No related branches found
No related tags found
No related merge requests found
......@@ -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 [ ! -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
}
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE='freedombone.cfg'
fi
read_config
read_configuration_values
interactive_config
show_result
exit 0
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment