summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBen Hughes <ben@puppetlabs.com>2011-03-17 12:23:44 +1100
committerJacob Helwig <jacob@puppetlabs.com>2011-03-17 15:12:41 -0700
commit3f0a3404894ea1835877856e20d60be4023706fc (patch)
tree2d5fe0f5d27aaad851bcc25871c3dd2fdb79cb8c /lib
parent469d2a26a467c50af9f9732d7f98e8a01ecc369f (diff)
downloadfacter-3f0a3404894ea1835877856e20d60be4023706fc.tar.gz
facter-3f0a3404894ea1835877856e20d60be4023706fc.tar.xz
facter-3f0a3404894ea1835877856e20d60be4023706fc.zip
(#6716) fix facter issues on OSX with ipv6 in macaddress.rb.
Due to "netstat -rn" returning multiple protocols (IPv4 and IPv6) the "default_interface" can get more than one entry in to it, causing the macaddress resolving to break. This limits it to just one interface.
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/util/macaddress.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/util/macaddress.rb b/lib/facter/util/macaddress.rb
index fc0a043..f6bae14 100644
--- a/lib/facter/util/macaddress.rb
+++ b/lib/facter/util/macaddress.rb
@@ -12,7 +12,7 @@ module Facter::Util::Macaddress
end
def self.default_interface
- `#{netstat_command} | /usr/bin/awk '/^default/{print $6}'`.chomp
+ `#{netstat_command} | /usr/bin/awk '/^default/{print $6;exit}'`.chomp
end
private