X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/4cae3ac4457fe9c0ea9e65de832d66f852483495..7ae6e279d071fb3facc32dbc5e1154aee20ca35b:/cookbooks/hardware/templates/default/ohai.rb.erb diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 8192d34c4..132d5bcac 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -5,12 +5,12 @@ Ohai.plugin(:Hardware) do def read_sysctl_link(file) File.basename(File.readlink(file)) - rescue Errno::ENOENT + rescue Errno::ENOENT, Errno::ENOTDIR end def read_sysctl_file(file) IO.read(file).strip - rescue Errno::ENOENT, Errno::EINVAL + rescue Errno::ENOENT, Errno::ENOTDIR, Errno::EINVAL end def parse_memory_size(size)