def self.get_single_interface_output(interface)
output = ""
case Facter.value(:kernel)
when 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly'
output = Facter::Util::IP.ifconfig_interface(interface)
when 'Linux'
ifconfig_output = Facter::Util::IP.ifconfig_interface(interface)
if interface =~ /^ib/ then
real_mac_address = get_infiniband_macaddress(interface)
output = ifconfig_output.sub(%r{(?:ether|HWaddr)\s+((\w{1,2}:){5,}\w{1,2})}, "HWaddr #{real_mac_address}")
else
output = ifconfig_output
end
when 'SunOS'
output = Facter::Util::IP.exec_ifconfig([interface])
when 'HP-UX'
mac = ""
ifc = hpux_ifconfig_interface(interface)
hpux_lanscan.scan(/(\dx\S+).*UP\s+(\w+\d+)/).each {|i| mac = i[0] if i.include?(interface) }
mac = mac.sub(/0x(\S+)/,'\1').scan(/../).join(":")
output = ifc + "\n" + mac
end
output
end