network: Fix ipv6enabled fact with facter 2.0
This commit is contained in:
parent
b8244798d3
commit
814432244b
1 changed files with 3 additions and 4 deletions
|
@ -5,11 +5,10 @@
|
||||||
Facter.add(:ipv6enabled) do
|
Facter.add(:ipv6enabled) do
|
||||||
setcode do
|
setcode do
|
||||||
out = Facter::Util::Resolution.exec('ping6 -c 1 ::1 2> /dev/null | egrep " [0\.]*% packet loss"')
|
out = Facter::Util::Resolution.exec('ping6 -c 1 ::1 2> /dev/null | egrep " [0\.]*% packet loss"')
|
||||||
if out
|
if out.empty?
|
||||||
"true"
|
|
||||||
else
|
|
||||||
"false"
|
"false"
|
||||||
|
else
|
||||||
|
"true"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue