summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-26 21:00:08 -0800
committerTim Smith <tsmith@chef.io>2018-11-26 21:00:08 -0800
commitb6b2d17b2729e991d5073839d8d57b8d2702b3e4 (patch)
tree1402c5e0237f821aa3c6728e10fa5eed02223f46
parent5d4e074e491eace039d48e98a0aa8f5ff88f440c (diff)
downloadohai-b6b2d17b2729e991d5073839d8d57b8d2702b3e4.tar.gz
Move gentoo entirely to os-release based detection
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/linux/platform.rb6
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb2
2 files changed, 0 insertions, 8 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index 1097cf4c..f7007685 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -253,12 +253,6 @@ Ohai.plugin(:Platform) do
end
platform_version os_release_info["VERSION"]
- elsif File.exist?("/etc/gentoo-release")
- platform "gentoo"
- # the gentoo release version is the base version used to bootstrap
- # a node and doesn't have a lot of meaning in a rolling release distro
- # kernel release will be used - ex. 3.18.7-gentoo
- platform_version `/bin/uname -r`.strip
elsif File.exist?("/etc/slackware-version")
platform "slackware"
platform_version File.read("/etc/slackware-version").scan(/(\d+|\.+)/).join
diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb
index 5ca6eae4..3614d3d8 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -312,7 +312,6 @@ OS_DATA
let(:have_usr_lib_os_release) { false }
let(:have_cisco_release) { false }
let(:have_f5_release) { false }
- let(:have_cumulus_dir) { false }
before(:each) do
allow(plugin).to receive(:collect_os).and_return(:linux)
@@ -331,7 +330,6 @@ OS_DATA
allow(File).to receive(:exist?).with("/etc/f5-release").and_return(have_f5_release)
allow(File).to receive(:exist?).with("/usr/lib/os-release").and_return(have_usr_lib_os_release)
allow(File).to receive(:exist?).with("/etc/shared/os-release").and_return(have_cisco_release)
- allow(Dir).to receive(:exist?).with("/etc/cumulus").and_return(have_cumulus_dir)
allow(File).to receive(:read).with("PLEASE STUB ALL File.read CALLS")
end