diff options
author | Micah Anderson <micah@leap.se> | 2014-12-22 14:53:25 -0500 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2014-12-22 14:53:25 -0500 |
commit | 8f9c8f32fce9e2f308d0cd2b92317fd753d79771 (patch) | |
tree | 7a4cad71f7e616842298ef365c720379256d20aa /provider_base | |
parent | 9eb4c55ef0f477afd9c0d74aff62c2bb74c16e8e (diff) | |
parent | 1f9f5f11cbf5ee3e9929203ceb2053f5ca164f5a (diff) |
Merge remote-tracking branch 'elijah/bugfix/multiplesshkeys' into develop
Diffstat (limited to 'provider_base')
-rw-r--r-- | provider_base/lib/macros/core.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |