projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use new timeservers
[mirror/dsa-puppet.git]
/
modules
/
debian-org
/
lib
/
facter
/
hosts.rb
diff --git
a/modules/debian-org/lib/facter/hosts.rb
b/modules/debian-org/lib/facter/hosts.rb
index
b55c43b
..
63c04cb
100644
(file)
--- a/
modules/debian-org/lib/facter/hosts.rb
+++ b/
modules/debian-org/lib/facter/hosts.rb
@@
-1,17
+1,21
@@
Facter.add("brokenhosts") do
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")
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
break
end
end
end
end
setcode do
- brokenhosts == "true"
+ if brokenhosts
+ true
+ else
+ ''
+ end
end
end
end
end