Include social key management as an option in the interactive installer
This commit is contained in:
parent
0aa61984b0
commit
f86537e4e9
|
@ -548,6 +548,26 @@ function interactive_configuration {
|
||||||
|
|
||||||
interactive_gpg
|
interactive_gpg
|
||||||
|
|
||||||
|
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."
|
||||||
|
if [[ $(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
|
||||||
|
dialog --title "Social Key Management" \
|
||||||
|
--backtitle "Freedombone Configuration" \
|
||||||
|
--yesno "$SOCIAL_KEY_STR" 15 60
|
||||||
|
else
|
||||||
|
dialog --title "Social Key Management" \
|
||||||
|
--backtitle "Freedombone Configuration" \
|
||||||
|
--defaultno \
|
||||||
|
--yesno "$SOCIAL_KEY_STR" 15 60
|
||||||
|
fi
|
||||||
|
sel=$?
|
||||||
|
case $sel in
|
||||||
|
0) ENABLE_SOCIAL_KEY_MANAGEMENT="yes";;
|
||||||
|
255) exit 1;;
|
||||||
|
esac
|
||||||
|
save_configuration_file
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $INSTALLING_ON_BBB == "no" ]]; then
|
if [[ $INSTALLING_ON_BBB == "no" ]]; then
|
||||||
|
@ -1293,6 +1313,9 @@ function read_configuration {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $CONFIGURATION_FILE ]; then
|
if [ -f $CONFIGURATION_FILE ]; then
|
||||||
|
if grep -q "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE; then
|
||||||
|
ENABLE_SOCIAL_KEY_MANAGEMENT=$(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
fi
|
||||||
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||||
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue