fixup hwaddr

This commit is contained in:
Doug MacEachern 2007-09-03 17:08:57 +00:00
parent bb945982da
commit 51cd482ece
1 changed files with 6 additions and 0 deletions

View File

@ -7,7 +7,13 @@ iflist.each do |ifname|
ifconfig = sigar.net_interface_config(ifname)
flags = ifconfig.flags
encap = ifconfig.type
hwaddr = ifconfig.hwaddr
if hwaddr == Sigar::NULL_HWADDR
hwaddr = ""
else
hwaddr = " HWaddr " + hwaddr
end
puts ifname + "\t" + "Link encap:" + encap + hwaddr