Don't delete keys from USB drive
This commit is contained in:
parent
1604af36b8
commit
0aa61984b0
|
@ -4616,14 +4616,9 @@ function search_for_attached_usb_drive {
|
||||||
cp -r $USB_MOUNT/.gnupg /home/$MY_USERNAME
|
cp -r $USB_MOUNT/.gnupg /home/$MY_USERNAME
|
||||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg
|
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg
|
||||||
GPG_KEYS_IMPORTED="yes"
|
GPG_KEYS_IMPORTED="yes"
|
||||||
if [ -f /home/$MY_USERNAME/.gnupg/secring.gpg ]; then
|
if [ ! -f /home/$MY_USERNAME/.gnupg/secring.gpg ]; then
|
||||||
shred -zu $USB_MOUNT/.gnupg/secring.gpg
|
|
||||||
shred -zu $USB_MOUNT/.gnupg/random_seed
|
|
||||||
shred -zu $USB_MOUNT/.gnupg/trustdb.gpg
|
|
||||||
rm -rf $USB_MOUNT/.gnupg
|
|
||||||
else
|
|
||||||
echo 'GPG files did not copy'
|
echo 'GPG files did not copy'
|
||||||
exit 7
|
exit 73529
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -4654,12 +4649,7 @@ function search_for_attached_usb_drive {
|
||||||
cp -r $USB_MOUNT/.ssh /home/$MY_USERNAME
|
cp -r $USB_MOUNT/.ssh /home/$MY_USERNAME
|
||||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.ssh
|
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.ssh
|
||||||
# for security delete the ssh keys from the usb drive
|
# for security delete the ssh keys from the usb drive
|
||||||
if [ -f /home/$MY_USERNAME/.ssh/id_rsa ]; then
|
if [ ! -f /home/$MY_USERNAME/.ssh/id_rsa ]; then
|
||||||
shred -zu $USB_MOUNT/.ssh/id_rsa
|
|
||||||
shred -zu $USB_MOUNT/.ssh/id_rsa.pub
|
|
||||||
shred -zu $USB_MOUNT/.ssh/known_hosts
|
|
||||||
rm -rf $USB_MOUNT/.ssh
|
|
||||||
else
|
|
||||||
echo 'ssh files did not copy'
|
echo 'ssh files did not copy'
|
||||||
exit 8
|
exit 8
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue