From f835ca6beafe91623b0f66ede802e3ebb98b9131 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 16 May 2017 09:12:56 -0700 Subject: Support BSD Signed-off-by: Tim Smith --- lib/ohai/plugins/zpools.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/ohai/plugins/zpools.rb') diff --git a/lib/ohai/plugins/zpools.rb b/lib/ohai/plugins/zpools.rb index 00313723..7e518663 100644 --- a/lib/ohai/plugins/zpools.rb +++ b/lib/ohai/plugins/zpools.rb @@ -47,7 +47,7 @@ Ohai.plugin(:Zpools) do pools end - collect_data(:solaris2, :linux) do + collect_data(:solaris2, :linux, :freebsd, :openbsd, :netbsd, :dragonflybsd) do pools = gather_pool_info # Grab individual health for devices in the zpools @@ -68,7 +68,8 @@ Ohai.plugin(:Zpools) do case line # linux: http://rubular.com/r/J3wQC6E2lH # solaris: http://rubular.com/r/FqOBzUQQ4p - when /^\s+((sd|c)[-_a-zA-Z0-9]+)\s+([-_a-zA-Z0-9]+)\s+(\d+)\s+(\d+)\s+(\d+)$/ + # freebsd: http://rubular.com/r/RYkMNlytXl + when /^\s+((sd|c|ad|da)[-_a-zA-Z0-9]+)\s+([-_a-zA-Z0-9]+)\s+(\d+)\s+(\d+)\s+(\d+)$/ Ohai::Log.debug("Plugin Zpools: Parsing zpool status line: #{line.chomp}") pools[pool][:devices][$1] = Mash.new pools[pool][:devices][$1][:state] = $3 -- cgit v1.2.1