From 3f0a3404894ea1835877856e20d60be4023706fc Mon Sep 17 00:00:00 2001 From: Ben Hughes Date: Thu, 17 Mar 2011 12:23:44 +1100 Subject: (#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. --- lib/facter/util/macaddress.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit