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.
Signed-off-by: Ben Hughes <b...@puppetlabs.com> --- Local-branch: tickets/master/6716 lib/facter/util/macaddress.rb | 2 +- 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 -- 1.7.4.1 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.