summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-28 20:43:03 -0800
committerTim Smith <tsmith@chef.io>2018-11-28 21:01:14 -0800
commit11c3c1ae45b0247632ccc0af10d899843cc0e5ed (patch)
treecc7bd5d151e9dd362e1a145c36b6d9bb356f42b3
parent124f5d2f0a5f97ae430f3f782a79577b4020675d (diff)
downloadohai-mangeia.tar.gz
Add mangeia platform with madriva platform_familymangeia
mangeia is a popular OS in France. It's a fork of Mandriva which went out of business. There's a few other forks of mandriva so that should probably be the platform_family. It even identifies that as being similar in the os-release file. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/linux/platform.rb2
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index 96beb4cf..40d14eba 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -173,6 +173,8 @@ Ohai.plugin(:Platform) do
"alpine"
when /clearlinux/
"clearlinux"
+ when /mangeia/
+ "mandriva"
end
end
diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb
index 5560fc84..6260a610 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -187,6 +187,10 @@ describe Ohai::System, "Linux plugin platform" do
expect(plugin.platform_family_from_platform(same_name)).to eq(same_name)
end
end
+
+ it "returns mandriva for mangeia platform" do
+ expect(plugin.platform_family_from_platform("mangeia")).to eq("mandriva")
+ end
end
describe "on system with /etc/os-release" do