浏览代码

Copy ssh keys from USB drive if they exist

Bob Mottram 9 年前
父节点
当前提交
04d8c4b542
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/freedombone-config

+ 5
- 1
src/freedombone-config 查看文件

@@ -241,7 +241,7 @@ function interactive_gpg {
241 241
   dialog --title "Encryption keys" \
242 242
          --backtitle "Freedombone Configuration" \
243 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 245
   sel=$?
246 246
   case $sel in
247 247
       1) return;;
@@ -300,6 +300,10 @@ function interactive_gpg {
300 300
 
301 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 307
   umount $GPG_USB_MOUNT
304 308
   rm -rf $GPG_USB_MOUNT
305 309
 }