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:
parent
b9873f50f0
commit
4eb72dabc9
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue