launcher: Check for ECDSA, ED25519 keys for SSH as well as CoreOS' location.
authorW-Mark Kubacki <wmark@hurrikane.de>
Wed, 15 Oct 2014 11:52:30 +0000 (13:52 +0200)
committerW-Mark Kubacki <wmark@hurrikane.de>
Wed, 15 Oct 2014 12:21:07 +0000 (14:21 +0200)
launcher

index 56742d28fa84c19f9a465a5b78873fac94c94dd6..3bf9f8d60200596510e27a326d9f968e1d00caff 100644 (file)
--- a/launcher
+++ b/launcher
@@ -129,15 +129,18 @@ fi
 get_ssh_pub_key() {
   local ${ssh_key_locations}
   ssh_key_locations=(
+    ~/.ssh/id_ed25519.pub
+    ~/.ssh/id_ecdsa.pub
     ~/.ssh/id_rsa.pub
     ~/.ssh/id_dsa.pub
+    ~core/.ssh/authorized_keys
   )
 
   local $keyfile
   for keyfile in "${ssh_key_locations[@]}"; do
     if [[ -e ${keyfile} ]] ; then
       ssh_pub_key="$(cat ${keyfile})"
-      return 1
+      return 0
     fi
   done
 
@@ -154,11 +157,11 @@ get_ssh_pub_key() {
       mkdir -p ~/.ssh && ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
       echo
       ssh_pub_key="$(cat ~/.ssh/id_rsa.pub)"
-      return 1
+      return 0
     fi
   fi
 
-  return 0
+  return 1
 }