projects
/
mirror
/
dsa-puppet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
remove retired hosters: carnet, freenet, helsinki, linaro, ugent, uni-karlsruhe,...
[mirror/dsa-puppet.git]
/
modules
/
debian_org
/
lib
/
facter
/
hosts.rb
1
Facter.add("brokenhosts") do
2
brokenhosts = true
3
if FileTest.exist?("/etc/hosts")
4
IO.foreach("/etc/hosts") do |x|
5
x.split.each do |y|
6
if y == Facter.value("fqdn")
7
brokenhosts = false
8
break
9
end
10
end
11
end
12
end
13
setcode do
14
if brokenhosts
15
true
16
else
17
false
18
end
19
end
20
end
21
22