summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/facter/ipaddress.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/ipaddress.rb b/lib/facter/ipaddress.rb
index b18b7c9..d7496f0 100644
--- a/lib/facter/ipaddress.rb
+++ b/lib/facter/ipaddress.rb
@@ -25,7 +25,7 @@ Facter.add(:ipaddress, :timeout => 2) do
# we need Hostname to exist for this to work
host = nil
if host = Facter::Util::Resolution.exec("host #{hostname}")
- host = host.chomp.split(/\s/)
+ list = host.chomp.split(/\s/)
if defined? list[-1] and
list[-1] =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/
list[-1]