1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge remote-tracking branch 'upstream/master' into internet_archive

This commit is contained in:
Andrew Kuklewicz 2013-03-06 12:15:36 -06:00
commit 4252cd61a5
3 changed files with 6 additions and 6 deletions

View file

@ -202,7 +202,7 @@ module Fog
end
# wait for aws to be ready
wait_for { sshable? }
wait_for { sshable?(credentials) }
Fog::SSH.new(public_ip_address, username, credentials).run(commands)
end

View file

@ -62,8 +62,8 @@ module Fog
22
end
def sshable?
ready? && !public_ip_address.nil? && !!Timeout::timeout(8) { ssh 'pwd' }
def sshable?(options={})
ready? && !public_ip_address.nil? && !!Timeout::timeout(8) { ssh('pwd', options) }
rescue SystemCallError, Net::SSH::AuthenticationFailed, Timeout::Error
false
end

View file

@ -87,13 +87,13 @@ module Fog
commands << %{echo "#{public_key}" >> ~/.ssh/authorized_keys}
end
# wait for aws to be ready
wait_for { sshable? }
if credentials[:password].nil? && !rootpassword.nil?
credentials[:password] = rootpassword
end
# wait for glesys to be ready
wait_for { sshable?(credentials) }
Fog::SSH.new(public_ip_address, username, credentials).run(commands)
end