# File lib/facter/util/macaddress.rb, line 11 11: def self.macaddress 12: iface = default_interface 13: Facter.warn "Could not find a default route. Using first non-loopback interface" if iface.empty? 14: 15: macaddress = `#{ifconfig_command} #{iface} | /usr/bin/awk '/ether/{print $2;exit}'`.chomp 16: macaddress.empty? ? nil : macaddress 17: end