From 5123a9507cb362c1308acb2fef939abe79c2e575 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 25 Mar 2011 16:46:20 -0300 Subject: squeeze does not have /proc/bus/usb/devices --- lib/facter/ekeyd.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/facter/ekeyd.rb b/lib/facter/ekeyd.rb index a201e7f..7521948 100644 --- a/lib/facter/ekeyd.rb +++ b/lib/facter/ekeyd.rb @@ -1,7 +1,6 @@ Facter.add('ekeyd_key_present') do confine :kernel => %w{Linux} setcode do - FileTest.exists?('/proc/bus/usb/devices') && \ - !(File.read('/proc/bus/usb/devices') =~ /Product=Entropy Key/).nil? + !Kernel.exec('lsusb | grep "Entropy Key"').empty? end end -- cgit v1.2.3