Importing from keydrive
This commit is contained in:
parent
6f54f4b515
commit
b5f6a554f3
|
@ -122,8 +122,8 @@ function interactive_gpg_from_usb {
|
|||
if [ -f $USB_MOUNT/.mastergpgkey && -f $USB_MOUNT/.backupgpgkey ]; then
|
||||
# Recovering keys from file rather than just copying the gnupg
|
||||
# directory may help to avoid problems during upgrades/reinstalls
|
||||
su -c "gpg --allow-secret-key-import --import $USB_MOUNT/.mastergpgkey" - $MY_USERNAME
|
||||
su -c "gpg --allow-secret-key-import --import $USB_MOUNT/.backupgpgkey" - $MY_USERNAME
|
||||
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/*
|
||||
|
|
Loading…
Reference in New Issue