network: Fix ipv6enabled fact with facter 2.0

This commit is contained in:
Ossi Salmi 2014-04-06 20:52:56 +03:00
parent b8244798d3
commit 814432244b

View file

@ -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