|
@@ -955,8 +955,8 @@ function reconstruct_key {
|
955
|
955
|
}
|
956
|
956
|
|
957
|
957
|
function interactive_gpg_from_usb {
|
958
|
|
- dialog --title $"Encryption keys" \
|
959
|
|
- --msgbox $'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
|
|
958
|
+ dialog --title $"Recover Encryption Keys" \
|
|
959
|
+ --msgbox $'Plug in a USB keydrive containing a copy of your full key or key fragment' 6 70
|
960
|
960
|
|
961
|
961
|
HOME_DIR=/home/$MY_USERNAME
|
962
|
962
|
GPG_LOADING="yes"
|
|
@@ -964,34 +964,17 @@ function interactive_gpg_from_usb {
|
964
|
964
|
GPG_CTR=0
|
965
|
965
|
while [[ $GPG_LOADING == "yes" ]]
|
966
|
966
|
do
|
967
|
|
- if [[ $INSTALLING_ON_BBB == "yes" ]]; then
|
968
|
|
- GPG_USB_DRIVE='/dev/sda1'
|
969
|
|
- if [ ! -b $GPG_USB_DRIVE ]; then
|
970
|
|
- if (( GPG_CTR > 0 )); then
|
971
|
|
- reconstruct_key
|
972
|
|
- return 0
|
973
|
|
- fi
|
974
|
|
- dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
|
975
|
|
- exit 739836
|
976
|
|
- fi
|
977
|
|
- else
|
978
|
|
- GPG_USB_DRIVE='/dev/sdb1'
|
979
|
|
- if [ ! -b $GPG_USB_DRIVE ]; then
|
980
|
|
- GPG_USB_DRIVE='/dev/sdc1'
|
981
|
|
- if [ ! -b $GPG_USB_DRIVE ]; then
|
982
|
|
- GPG_USB_DRIVE='/dev/sdd1'
|
983
|
|
- if [ ! -b $GPG_USB_DRIVE ]; then
|
984
|
|
- if (( GPG_CTR > 0 )); then
|
985
|
|
- reconstruct_key
|
986
|
|
- return 0
|
987
|
|
- fi
|
988
|
|
- dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
|
989
|
|
- exit 27852
|
990
|
|
- fi
|
991
|
|
- fi
|
|
967
|
+ if [ ! -b $GPG_USB_DRIVE ]; then
|
|
968
|
+ if (( GPG_CTR > 0 )); then
|
|
969
|
+ reconstruct_key
|
|
970
|
+ return 0
|
992
|
971
|
fi
|
|
972
|
+ dialog --title $"Recover Encryption Keys" --msgbox $'No USB drive found' 6 30
|
|
973
|
+ exit 739836
|
993
|
974
|
fi
|
994
|
975
|
|
|
976
|
+ detect_usb_drive
|
|
977
|
+ GPG_USB_DRIVE=$USB_DRIVE
|
995
|
978
|
GPG_USB_MOUNT='/mnt/usb'
|
996
|
979
|
umount -f $GPG_USB_MOUNT
|
997
|
980
|
if [ ! -d $GPG_USB_MOUNT ]; then
|
|
@@ -1013,7 +996,7 @@ function interactive_gpg_from_usb {
|
1013
|
996
|
reconstruct_key
|
1014
|
997
|
return 0
|
1015
|
998
|
fi
|
1016
|
|
- dialog --title $"Encryption keys" \
|
|
999
|
+ dialog --title $"Recover Encryption Keys" \
|
1017
|
1000
|
--msgbox $"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
|
1018
|
1001
|
rm -rf $GPG_USB_MOUNT
|
1019
|
1002
|
exit 74393
|