# File lib/facter/util/macaddress.rb, line 19 def self.default_interface `#{netstat_command} | /usr/bin/awk '/^default/{print $6;exit}'`.chomp end
# File lib/facter/util/macaddress.rb, line 11 def self.macaddress iface = default_interface Facter.warn "Could not find a default route. Using first non-loopback interface" if iface.empty? macaddress = `#{ifconfig_command} #{iface} | /usr/bin/awk '/ether/{print $2;exit}'`.chomp macaddress.empty? ? nil : macaddress end
Generated with the Darkfish Rdoc Generator 2.