diff --git a/lib/facter/kmod.rb b/lib/facter/kmod.rb index 8004fd4..e8e1a30 100644 --- a/lib/facter/kmod.rb +++ b/lib/facter/kmod.rb @@ -24,7 +24,7 @@ next unless File.readable?("/sys/module/#{directory}/parameters/#{param}") begin - kmod[directory]['parameters'][param] = File.read("/sys/module/#{directory}/parameters/#{param}").chomp + kmod[directory]['parameters'][param] = File.read("/sys/module/#{directory}/parameters/#{param}").chomp.delete("\u0000") rescue StandardError # some kernel parameters are write only # even though they have the read bit set