The arp command is in /sbin on Fedora/RHEL, not /usr/sbin. Using Facter::Util::Resolution.exec is preferable to hard-coding the path. --- lib/facter/arp.rb | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/facter/arp.rb b/lib/facter/arp.rb index 65cf4c3..5035ad0 100644 --- a/lib/facter/arp.rb +++ b/lib/facter/arp.rb @@ -4,9 +4,11 @@ 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+$/ + output = Facter::Util::Resolution.exec('arp -a') + if not output.nil? + output.each_line do |s| + arp.push($1) if s =~ /^\S+\s\S+\s\S+\s(\S+)\s\S+\s\S+\s\S+$/ + end end arp[0] end -- 1.7.4.1 -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move. -- Douglas Adams -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.