dialog --title"Encryption keys"--msgbox'Unable to reconstruct the key' 6 70
dialog --title$"Encryption keys"--msgbox$'Unable to reconstruct the key' 6 70
fi
su -c"gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
if[!"$?"="0"];then
echo'Unable to import gpg key'
echo$'Unable to import gpg key'
shred-zu$KEYS_FILE
rm-rf /home/$MY_USERNAME/.tempgnupg
exit 9654
fi
shred-zu$KEYS_FILE
dialog --title"Encryption keys"--msgbox'Key has been reconstructed' 6 70
dialog --title$"Encryption keys"--msgbox$'Key has been reconstructed' 6 70
}
function interactive_gpg_from_usb {
dialog --title"Encryption keys"\
--msgbox'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
dialog --title$"Encryption keys"\
--msgbox$'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
HOME_DIR=/home/$MY_USERNAME
GPG_LOADING="yes"
...
...
@@ -352,7 +352,7 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title"Encryption keys"--msgbox'No USB drive found' 6 30
dialog --title$"Encryption keys"--msgbox$'No USB drive found' 6 30
exit 739836
fi
else
...
...
@@ -366,7 +366,7 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title"Encryption keys"--msgbox'No USB drive found' 6 30
dialog --title$"Encryption keys"--msgbox$'No USB drive found' 6 30
exit 27852
fi
fi
...
...
@@ -394,8 +394,8 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title"Encryption keys"\
--msgbox"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
dialog --title$"Encryption keys"\
--msgbox$"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
rm-rf$GPG_USB_MOUNT
exit 74393
fi
...
...
@@ -408,8 +408,8 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title"Encryption keys"\
--msgbox"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
dialog --title$"Encryption keys"\
--msgbox$"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
umount -f$GPG_USB_MOUNT
rm-rf$GPG_USB_MOUNT
exit 723814
...
...
@@ -422,8 +422,8 @@ function interactive_gpg_from_usb {
fi
cp-r$GPG_USB_MOUNT/.gnupg/*$HOME_DIR/.gnupg
GPG_LOADING="no"
dialog --title"Encryption keys"\
--msgbox"GPG Keyring loaded to $HOME_DIR" 6 70
dialog --title$"Encryption keys"\
--msgbox$"GPG Keyring loaded to $HOME_DIR" 6 70
else
if[!-d$HOME_DIR/.gnupg_fragments ];then
mkdir$HOME_DIR/.gnupg_fragments
...
...
@@ -437,8 +437,8 @@ function interactive_gpg_from_usb {
mkdir$HOME_DIR/.ssh
fi
cp$GPG_USB_MOUNT/.ssh/*$HOME_DIR/.ssh
dialog --title"Encryption keys"\
--msgbox"ssh keys imported" 6 70
dialog --title$"Encryption keys"\
--msgbox$"ssh keys imported" 6 70
SSH_IMPORTED="yes"
fi
fi
...
...
@@ -446,8 +446,8 @@ function interactive_gpg_from_usb {
umount -f$GPG_USB_MOUNT
rm-rf$GPG_USB_MOUNT
if[[$GPG_LOADING=="yes"]];then
dialog --title"Encryption keys"\
--msgbox"Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
dialog --title$"Encryption keys"\
--msgbox$"Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
fi
GPG_CTR=$((GPG_CTR +1))
done
...
...
@@ -460,11 +460,11 @@ function interactive_gpg {
GPG_CONFIGURED="yes"
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--radiolist"GPG/PGP keys for your system:" 13 70 3 \
1 "Generate new keys (new user)" on \
2 "Import keys from USB drive/s" off \
3 "Retrieve keys from friends servers" off 2> $data
dialog --backtitle$"Freedombone Configuration"\
--radiolist$"GPG/PGP keys for your system:" 13 70 3 \
1 $"Generate new keys (new user)" on \
2 $"Import keys from USB drive/s" off \
3 $"Retrieve keys from friends servers" off 2> $data
sel=$?
case$selin
1)exit 1;;
...
...
@@ -489,25 +489,25 @@ function interactive_configuration {
cp$CONFIGURATION_FILE temp.cfg
fi
FREEDNS_MESSAGE="Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
FREEDNS_MESSAGE=$"Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
dialog --title"Freedombone"--msgbox"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
dialog --title$"Freedombone"--msgbox$"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--radiolist"Type of Installation:" 18 40 11 \
1 Full on \
2 Writer off \
3 Cloud off \
4 Chat off \
5 Mailbox off \
6 Non-Mailbox off \
7 Social off \
8 Media off \
9 Developer off \
10 "Mesh (router)" off \
11 "Mesh (user device)" off 2> $data
dialog --backtitle$"Freedombone Configuration"\
--radiolist$"Type of Installation:" 18 40 11 \
1 $"Full" on \
2 $"Writer" off \
3 $"Cloud" off \
4 $"Chat" off \
5 $"Mailbox" off \
6 $"Non-Mailbox" off \
7 $"Social" off \
8 $"Media" off \
9 $"Developer" off \
10 $"Mesh (router)" off \
11 $"Mesh (user device)" off 2> $data
sel=$?
case$selin
1)exit 1;;
...
...
@@ -554,8 +554,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--inputbox"Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep'ESSID' temp.cfg | awk-F'=''{print $2}')" 2> $data
dialog --backtitle$"Freedombone Configuration"\
--inputbox$"Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep'ESSID' temp.cfg | awk-F'=''{print $2}')" 2> $data
sel=$?
case$selin
0)ESSID=$(cat$data);;
...
...
@@ -567,8 +567,8 @@ function interactive_configuration {
if[[$SYSTEM_TYPE!="$VARIANT_MESH_USER"]];then
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--inputbox"Give your mesh peer a name" 10 40 "$(grep'DEFAULT_DOMAIN_NAME' temp.cfg | awk-F'=''{print $2}')" 2> $data
dialog --backtitle$"Freedombone Configuration"\
--inputbox$"Give your mesh peer a name" 10 40 "$(grep'DEFAULT_DOMAIN_NAME' temp.cfg | awk-F'=''{print $2}')" 2> $data
sel=$?
case$selin
0)DEFAULT_DOMAIN_NAME=$(cat$data);;
...
...
@@ -582,8 +582,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--radiolist"Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
dialog --backtitle$"Freedombone Configuration"\
--radiolist$"Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
1 "1" on \
2 "5" off \
3 "9" off \
...
...
@@ -626,23 +626,23 @@ function interactive_configuration {
echo"| | (.-' (.-' ( | ( )| | | | )( )| | (.-' "
echo"' ' --' --' -' - -' ' ' -' -' -' ' - --'"
echo''
echo'Your system is now ready for connection to the mesh network'
echo$'Your system is now ready for connection to the mesh network'
echo''
echo'To connect to the network open a terminal and type:'
echo$'To connect to the network open a terminal and type:'
echo''
echo' meshweb'
echo''
echo'To disconnect from the mesh and return to the internet type:'
echo$'To disconnect from the mesh and return to the internet type:'
echo''
echo' sudo batman stop'
echo''
echo'To turn your system into a dedicated mesh peer you could add'
echo'the meshweb command to your startup applications'
echo$'To turn your system into a dedicated mesh peer you could add'
echo$'the meshweb command to your startup applications'
echo''
touch /tmp/meshuserdevice
exit 0
else
echo'Failed to fully install the mesh networking system'
echo$'Failed to fully install the mesh networking system'
exit 74589
fi
fi
...
...
@@ -652,8 +652,8 @@ function interactive_configuration {
else
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --title"Select the user account to install as"\
--backtitle"Freedombone Configuration"\
dialog --title$"Select the user account to install as"\
--yesno"\nAre you installing onto a Beaglebone Black?" 7 60
dialog --title$"Install Target"\
--backtitle$"Freedombone Configuration"\
--yesno$"\nAre you installing onto a Beaglebone Black?" 7 60
else
dialog --title"Install Target"\
--backtitle"Freedombone Configuration"\
dialog --title$"Install Target"\
--backtitle$"Freedombone Configuration"\
--defaultno\
--yesno"\nAre you installing onto a Beaglebone Black?" 7 60
--yesno$"\nAre you installing onto a Beaglebone Black?" 7 60
fi
sel=$?
case$selin
...
...
@@ -712,14 +712,14 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
SOCIAL_KEY_STR="\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
SOCIAL_KEY_STR=$"\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
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
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
...
...
@@ -1031,8 +1031,8 @@ function interactive_configuration {
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
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$selin
0)MY_NAME=$(cat$data);;
...
...
@@ -1057,11 +1057,11 @@ function interactive_configuration {
fi
data=$(tempfile 2>/dev/null)
trap"rm -f $data" 0 1 2 5 15
dialog --backtitle"Freedombone Configuration"\
--title"Local Network Configuration"\
--form"\nPlease enter the IP addresses:" 11 55 3 \