This commit is contained in:
Bob Mottram 2017-06-23 22:27:42 +01:00
parent d321d9f18f
commit dc436a7687
1 changed files with 6 additions and 6 deletions

View File

@ -128,12 +128,12 @@ function interactive_gpg_from_usb {
echo $'No backup key file found on USB drive'
exit 725729
fi
gpg --homedir=/home/$MY_USERNAME/.gnupg --allow-secret-key-import --import $USB_MOUNT/.mastergpgkey
echo "$BACKUP_DUMMY_PASSWORD" | gpg --batch --passphrase-fd 0 --homedir=/home/$MY_USERNAME/.gnupg --allow-secret-key-import --import $USB_MOUNT/.backupgpgkey
if [ -d /home/$MY_USERNAME/.gnupg ]; then
chmod 700 /home/$MY_USERNAME/.gnupg
chmod -R 600 /home/$MY_USERNAME/.gnupg/*
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg
gpg --homedir=$HOME_DIR/.gnupg --allow-secret-key-import --import $USB_MOUNT/.mastergpgkey
echo "$BACKUP_DUMMY_PASSWORD" | gpg --batch --passphrase-fd 0 --homedir=$HOME_DIR/.gnupg --allow-secret-key-import --import $USB_MOUNT/.backupgpgkey
if [ -d $HOME_DIR/.gnupg ]; then
chmod 700 $HOME_DIR/.gnupg
chmod -R 600 $HOME_DIR/.gnupg/*
chown -R $MY_USERNAME:$MY_USERNAME $HOME_DIR/.gnupg
fi
GPG_LOADING="no"
dialog --title $"Recover Encryption Keys" \