summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/facter/ekeyd.rb3
-rw-r--r--manifests/init.pp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/facter/ekeyd.rb b/lib/facter/ekeyd.rb
index a201e7f..5a4417c 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?
+ !`lsusb | grep "Entropy Key"`.empty?
end
end
diff --git a/manifests/init.pp b/manifests/init.pp
index 204d877..b3b780d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -3,6 +3,8 @@ class ekeyd(
$ekeyd_masterkey
){
+ package { "usbutils": ensure => installed }
+
if $ekeyd_key_present != 'true' { fail("Can't find an ekey key plugged into usb on ${fqdn}") }
include ekeyd::base