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

Try the next drive letter on failure

parent 8a979439
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES
do
source $f
source $f
done
read_config_param USB_DRIVE
......@@ -202,11 +202,20 @@ 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
umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT
exit 723814
if [[ "$GPG_USB_DRIVE" == *"sda1" ]]; then
GPG_USB_DRIVE=/dev/sdb1
write_config_param USB_DRIVE "$GPG_USB_DRIVE"
umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT
${PROJECT_NAME}-recoverkey -u "$MY_USERNAME" -d sdb
exit 0
else
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
fi
fi
fi
......
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