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-*
|
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||||
for f in $UTILS_FILES
|
for f in $UTILS_FILES
|
||||||
do
|
do
|
||||||
source $f
|
source $f
|
||||||
done
|
done
|
||||||
|
|
||||||
read_config_param USB_DRIVE
|
read_config_param USB_DRIVE
|
||||||
|
@ -202,11 +202,20 @@ function interactive_gpg_from_usb {
|
||||||
reconstruct_key
|
reconstruct_key
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
dialog --title $"Encryption keys" \
|
if [[ "$GPG_USB_DRIVE" == *"sda1" ]]; then
|
||||||
--msgbox $"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
|
GPG_USB_DRIVE=/dev/sdb1
|
||||||
umount -f $GPG_USB_MOUNT
|
write_config_param USB_DRIVE "$GPG_USB_DRIVE"
|
||||||
rm -rf $GPG_USB_MOUNT
|
umount -f $GPG_USB_MOUNT
|
||||||
exit 723814
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue