From 04d8c4b542731f28889cae069adaaf13317252de Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Jun 2015 23:12:05 +0100 Subject: [PATCH] Copy ssh keys from USB drive if they exist --- src/freedombone-config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freedombone-config b/src/freedombone-config index f9093a86..34dda83a 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -241,7 +241,7 @@ function interactive_gpg { dialog --title "Encryption keys" \ --backtitle "Freedombone Configuration" \ --defaultno \ - --yesno "\nDo you have existing GPG/PGP keys that you wish to install?" 7 60 + --yesno "\nDo you have existing GPG/PGP/ssh keys that you wish to install?" 7 60 sel=$? case $sel in 1) return;; @@ -300,6 +300,10 @@ function interactive_gpg { cp -r $GPG_USB_MOUNT/.gnupg /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}') + if [ -d $GPG_USB_MOUNT/.ssh ]; then + cp $GPG_USB_MOUNT/.ssh/* /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')/.ssh + fi + umount $GPG_USB_MOUNT rm -rf $GPG_USB_MOUNT }