fix acpi_available return values and usage
authordavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>
Wed, 8 Aug 2007 07:13:06 +0000 (07:13 +0000)
committerdavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>
Wed, 8 Aug 2007 07:13:06 +0000 (07:13 +0000)
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@183 f03ff2f1-f02d-0410-970d-b9634babeaa1

files/facter/acpi_available.rb
manifests/plugin.pp

index 45e5288..216f608 100644 (file)
@@ -2,9 +2,9 @@
 Facter.add("acpi_available") do
        setcode do
                if `acpi -t -B -A 2>/dev/null`.match(/\d/).nil? 
-                       "false"
+                       "absent"
                else
-                       "true"
+                       "present"
                end
        end
 end
index e875ddb..fb2f882 100644 (file)
@@ -112,10 +112,8 @@ class munin::plugins::linux inherits munin::plugins::base {
                  vmstat
                ]:
                        ensure => present;
-       }
-
-       if $acpi_available {
-               plugin { acpi: }
+               acpi: 
+                       ensure => $acpi_available;
        }
 
        include munin::plugins::interfaces