summaryrefslogtreecommitdiff
path: root/files/facter/acpi_available.rb
blob: 45e52888ad932be834c8d1e3384162068483fe36 (plain)
1
2
3
4
5
6
7
8
9
10
# return whether acpi is available -- used for desiding whether to install the munin plugin
Facter.add("acpi_available") do
	setcode do
		if `acpi -t -B -A 2>/dev/null`.match(/\d/).nil? 
			"false"
		else
			"true"
		end
	end
end