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

check ip-address that returned from the search in the logfile

This commit is contained in:
Patrick Debois 2011-08-08 15:49:12 -06:00
parent b9873f50f0
commit 4eb72dabc9

View file

@ -291,6 +291,9 @@ module Fog
# or local execute arp -an to get the ip (as a last resort)
end
# We check if the result is an actual ip-address
# otherwise we return nil
ipaddress=nil unless ipaddress=~/^(\d{1,3}\.){3}\d{1,3}$/
return { :public => [ipaddress], :private => [ipaddress]}
end