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

No need to read usb drive

parent 408eb082
No related branches found
No related tags found
No related merge requests found
......@@ -42,20 +42,13 @@ do
source $f
done
read_config_param USB_DRIVE
FRIENDS_SERVERS_LIST=
MY_USERNAME=
if [ $USB_DRIVE ]; then
GPG_USB_DRIVE=$USB_DRIVE
else
GPG_USB_DRIVE='/dev/sdb1'
fi
function show_help {
echo ''
echo $"${PROJECT_NAME}-recoverkey -u [username] -d [drive]"
echo $' -l [friends servers list filename]'
echo $"${PROJECT_NAME}-recoverkey -u [username]"
echo $' -l [friends servers list filename]'
echo ''
exit 0
}
......@@ -78,14 +71,6 @@ do
shift
FRIENDS_SERVERS_LIST="$1"
;;
-d|--drive)
shift
if [[ "${1}" != '/dev/'* ]]; then
GPG_USB_DRIVE=/dev/${1}1
else
GPG_USB_DRIVE=${1}
fi
;;
*)
# unknown option
;;
......
......@@ -50,7 +50,7 @@ function reconstruct_key {
dialog --title $"Recover Encryption Keys" --msgbox $'Unable to reconstruct the key' 6 70
fi
su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
gpg --homedir=/home/$MY_USERNAME/.gnupg --allow-secret-key-import --import $KEYS_FILE
if [ ! "$?" = "0" ]; then
echo $'Unable to import gpg key'
shred -zu $KEYS_FILE
......
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