summaryrefslogtreecommitdiff
path: root/lib/facter/ekeyd.rb
blob: a201e7ff25528cc0bbca953344be2745e0fb3dcb (plain)
1
2
3
4
5
6
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