projects
/
mirror
/
dsa-puppet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix broken file path
[mirror/dsa-puppet.git]
/
facts
/
hosts.rb
1
Facter.add("brokenhosts") do
2
confine :kernel => :linux
3
brokenhosts = "true"
4
if FileTest.exist?("/etc/hosts")
5
IO.foreach("/etc/hosts") do |x|
6
x.split.each do |y|
7
if y == Facter.value("fqdn")
8
brokenhosts = "false"
9
break
10
end
11
end
12
end
13
end
14
setcode do
15
brokenhosts == "true"
16
end
17
end
18
19