Browse Source

Copy ssh keys from USB drive if they exist

Bob Mottram 10 years ago
parent
commit
04d8c4b542
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/freedombone-config

+ 5
- 1
src/freedombone-config View File

241
   dialog --title "Encryption keys" \
241
   dialog --title "Encryption keys" \
242
          --backtitle "Freedombone Configuration" \
242
          --backtitle "Freedombone Configuration" \
243
          --defaultno \
243
          --defaultno \
244
-         --yesno "\nDo you have existing GPG/PGP keys that you wish to install?" 7 60
244
+         --yesno "\nDo you have existing GPG/PGP/ssh keys that you wish to install?" 7 60
245
   sel=$?
245
   sel=$?
246
   case $sel in
246
   case $sel in
247
       1) return;;
247
       1) return;;
300
 
300
 
301
   cp -r $GPG_USB_MOUNT/.gnupg /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')
301
   cp -r $GPG_USB_MOUNT/.gnupg /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')
302
 
302
 
303
+  if [ -d $GPG_USB_MOUNT/.ssh ]; then
304
+      cp $GPG_USB_MOUNT/.ssh/* /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')/.ssh
305
+  fi
306
+
303
   umount $GPG_USB_MOUNT
307
   umount $GPG_USB_MOUNT
304
   rm -rf $GPG_USB_MOUNT
308
   rm -rf $GPG_USB_MOUNT
305
 }
309
 }