diff --git a/lib/puppet/provider/sysctl/augeas.rb b/lib/puppet/provider/sysctl/augeas.rb index a1714bd..10a9112 100644 --- a/lib/puppet/provider/sysctl/augeas.rb +++ b/lib/puppet/provider/sysctl/augeas.rb @@ -77,12 +77,14 @@ def self.instances(reference_resource = nil) # Grab everything else resources ||= [] + sysctl_all_args = '-a' sep = '=' + if Facter.value(:kernel) == 'FreeBSD' - sep = ':' + sysctl_all_args = '-aeW' end - sysctl('-a').each_line do |line| + sysctl(sysctl_all_args).each_line do |line| line = line.force_encoding("US-ASCII").scrub("") value = line.split(sep)