From 1f9f5f11cbf5ee3e9929203ceb2053f5ca164f5a Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 21 Dec 2014 16:45:17 -0800 Subject: fixed bug that prevented all users/*/*_ssh.pub keys from getting added to authorized_keys --- provider_base/lib/macros/core.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provider_base/lib/macros/core.rb b/provider_base/lib/macros/core.rb index 2ab2e71b..7de50f2f 100644 --- a/provider_base/lib/macros/core.rb +++ b/provider_base/lib/macros/core.rb @@ -22,6 +22,9 @@ module LeapCli keys.sort.each do |keyfile| ssh_type, ssh_key = File.read(keyfile, :encoding => 'UTF-8').strip.split(" ") name = File.basename(File.dirname(keyfile)) + until hash[name].nil? + i ||= 1; name = "#{name}#{i+=1}" + end hash[name] = { "type" => ssh_type, "key" => ssh_key -- cgit v1.2.3