summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-09-24 13:02:37 +0200
committermh <mh@immerda.ch>2010-09-24 13:02:37 +0200
commit49d6b734a816b9ef1c92b034c2850bff24d68e37 (patch)
treea8e3eebbb44a2a66ddef83c84f68f2e17adeaa79 /lib
downloadpuppet-ekeyd-49d6b734a816b9ef1c92b034c2850bff24d68e37.tar.gz
puppet-ekeyd-49d6b734a816b9ef1c92b034c2850bff24d68e37.tar.bz2
init release of ekeyd module
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/ekeyd.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/facter/ekeyd.rb b/lib/facter/ekeyd.rb
new file mode 100644
index 0000000..a201e7f
--- /dev/null
+++ b/lib/facter/ekeyd.rb
@@ -0,0 +1,7 @@
+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?
+ end
+end