fix munin 1
[mirror/dsa-puppet.git] / modules / debian-org / lib / facter / hosts.rb
index b55c43b..63c04cb 100644 (file)
@@ -1,17 +1,21 @@
 Facter.add("brokenhosts") do
-       brokenhosts = "true"
+       brokenhosts = true
        if FileTest.exist?("/etc/hosts")
                IO.foreach("/etc/hosts") do |x|
                        x.split.each do |y|
                                if y == Facter.value("fqdn")
-                                       brokenhosts = "false"
+                                       brokenhosts = false
                                        break
                                end
                        end
                end
        end
        setcode do
-               brokenhosts == "true"
+               if brokenhosts
+                       true
+               else
+                       ''
+               end
        end
 end