blob: f15a3049dbc3714533d53bea434d07c1a8369f16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
Facter.add('ekeyd_key_present') do
setcode do
FileTest.exists?('/proc/bus/usb/devices') && \
!(File.read('/proc/bus/usb/devices') =~ /Product=Entropy Key/).nil?
end
end
Facter.add('ekeyd_key_present') do
confine :operatingsystem => %w{Debian}
setcode do
!`lsusb | grep "Entropy Key"`.empty?
end
end
|