Try the next drive letter on failure
This commit is contained in:
parent
8a979439fd
commit
1592227f8c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue