summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-02-25 14:09:26 -0800
committerTim Smith <tsmith@chef.io>2018-02-25 14:09:26 -0800
commit508e12d33fed2f8be112291f947f0ad720c803d3 (patch)
tree1bdda27c4b0b7e6a7d443ebb4251e28e0e939b43
parent034a8a2f2ebccfc50657b8a79d73deeca4c27b17 (diff)
downloadohai-508e12d33fed2f8be112291f947f0ad720c803d3.tar.gz
Remove duplicate dragonfly kernel code
It's 100% the same as FreeBSD Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/kernel.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/ohai/plugins/kernel.rb b/lib/ohai/plugins/kernel.rb
index 032be9b9..8d6372d7 100644
--- a/lib/ohai/plugins/kernel.rb
+++ b/lib/ohai/plugins/kernel.rb
@@ -4,7 +4,7 @@
# Author:: Bryan McLellan (<btm@loftninjas.org>)
# Author:: Claire McQuin (<claire@chef.io>)
# Author:: James Gartrell (<jgartrel@gmail.com>)
-# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
+# Copyright:: Copyright (c) 2008-2018 Chef Software, Inc.
# Copyright:: Copyright (c) 2009 Bryan McLellan
# License:: Apache License, Version 2.0
#
@@ -94,7 +94,7 @@ Ohai.plugin(:Kernel) do
kernel[:modules] = modules
end
- collect_data(:freebsd) do
+ collect_data(:freebsd, :dragonflybsd) do
kernel init_kernel
kernel[:os] = kernel[:name]
@@ -138,18 +138,6 @@ Ohai.plugin(:Kernel) do
kernel[:modules] = bsd_modules("/usr/bin/modstat")
end
- collect_data(:dragonflybsd) do
- kernel init_kernel
- kernel[:os] = kernel[:name]
-
- so = shell_out("uname -i")
- kernel[:ident] = so.stdout.split($/)[0]
- so = shell_out("sysctl kern.securelevel")
- kernel[:securelevel] = so.stdout.split($/).select { |e| e =~ /kern.securelevel: (.+)$/ }
-
- kernel[:modules] = bsd_modules("/sbin/kldstat")
- end
-
collect_data(:solaris2) do
kernel init_kernel