Don't copy key fragment to drive if it already contains a full keyring
This commit is contained in:
parent
b9e8421e8f
commit
fc45a596a6
|
@ -127,6 +127,15 @@ if [[ $MASTER_DRIVE == "yes" || $MASTER_DRIVE == "y" || $MASTER_DRIVE == "1" ]];
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Don't use the USB drive if it already contains a full keyring
|
||||
if [ -d $USB_MOUNT/.gnupg ]; then
|
||||
echo 'A full GPG keyring already exists on the USB drive.'
|
||||
echo 'Either reformat the USB drive or use a different drive.'
|
||||
umount -f $USB_MOUNT
|
||||
rm -rf $USB_MOUNT
|
||||
exit 3392
|
||||
fi
|
||||
|
||||
# Append the username as a subdirectory.
|
||||
# This has a down side in that it does identify a given fragment
|
||||
# as belonging to a given user, but has the convenience upside
|
||||
|
|
Loading…
Reference in New Issue