lib/facter/util/ip.rb in facter-1.6.13 vs lib/facter/util/ip.rb in facter-1.6.14.rc1
- old
+ new
@@ -85,12 +85,12 @@
end
output
end
def self.get_infiniband_macaddress(interface)
- if File::exist?("/sys/class/net/#{interface}/address") then
+ if File.exists?("/sys/class/net/#{interface}/address") then
ib_mac_address = `cat /sys/class/net/#{interface}/address`.chomp
- elsif File::exist?("/sbin/ip") then
+ elsif File.exists?("/sbin/ip") then
ip_output = %x{/sbin/ip link show #{interface}}
ib_mac_address = ip_output.scan(%r{infiniband\s+((\w{1,2}:){5,}\w{1,2})})
else
ib_mac_address = "FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF"
Facter.debug("ip.rb: nothing under /sys/class/net/#{interface}/address and /sbin/ip not available")