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