diff options
author | Todd Zullinger <tmz@pobox.com> | 2011-03-18 08:40:48 -0400 |
---|---|---|
committer | Todd Zullinger <tmz@pobox.com> | 2011-03-18 08:40:48 -0400 |
commit | 3eb9410f8f3f03730748ca0d8fa2c33b69e8a413 (patch) | |
tree | 1491bc1d7493a708db81cca901f959ef7b10f883 /lib/facter | |
parent | 50b9b3f5bfdeefd6055a1c1fefd5f0005f95879c (diff) | |
download | facter-3eb9410f8f3f03730748ca0d8fa2c33b69e8a413.tar.gz facter-3eb9410f8f3f03730748ca0d8fa2c33b69e8a413.tar.xz facter-3eb9410f8f3f03730748ca0d8fa2c33b69e8a413.zip |
arp: Cleanup indendation
Diffstat (limited to 'lib/facter')
-rw-r--r-- | lib/facter/arp.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/facter/arp.rb b/lib/facter/arp.rb index f4b7709..65cf4c3 100644 --- a/lib/facter/arp.rb +++ b/lib/facter/arp.rb @@ -1,22 +1,22 @@ require 'facter/util/ip' Facter.add(:arp) do - confine :kernel => :linux - setcode do - arp = [] - output = %x{/usr/sbin/arp -a} - output.each_line do |s| - arp.push($1) if s =~ /^\S+\s\S+\s\S+\s(\S+)\s\S+\s\S+\s\S+$/ - end - arp[0] - end + confine :kernel => :linux + setcode do + arp = [] + output = %x{/usr/sbin/arp -a} + output.each_line do |s| + arp.push($1) if s =~ /^\S+\s\S+\s\S+\s(\S+)\s\S+\s\S+\s\S+$/ + end + arp[0] + end end Facter::Util::IP.get_interfaces.each do |interface| - Facter.add("arp_" + Facter::Util::IP.alphafy(interface)) do + Facter.add("arp_" + Facter::Util::IP.alphafy(interface)) do confine :kernel => :linux - setcode do - Facter::Util::IP.get_arp_value(interface) - end + setcode do + Facter::Util::IP.get_arp_value(interface) end + end end |