summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-12-05 11:46:21 -0800
committerGitHub <noreply@github.com>2018-12-05 11:46:21 -0800
commit31c3c7483d42957bdb302c96b2d65588b6008804 (patch)
treede8f849385c07948ad98cb3d3f34c31e1807fd00
parent22b8818c7f8b0a3af08bb5d91de363d856d1ba21 (diff)
parent24fcdeab8dc8c021afae73f82ff176495dd27263 (diff)
downloadohai-31c3c7483d42957bdb302c96b2d65588b6008804.tar.gz
Merge pull request #1283 from heyjodom/xcp-ng_support
Add support for XCP-ng platform
-rw-r--r--lib/ohai/plugins/linux/platform.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index 46299e6f..b170a738 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -144,7 +144,7 @@ Ohai.plugin(:Platform) do
when /debian/, /ubuntu/, /linuxmint/, /raspbian/, /cumulus/, /kali/
# apt-get+dpkg almost certainly goes here
"debian"
- when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/, /clearos/, /bigip/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
+ when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /xcp/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/, /clearos/, /bigip/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
# NOTE: "rhel" should be reserved exclusively for recompiled rhel versions that are nearly perfectly compatible down to the platform_version.
# The operating systems that are "rhel" should all be as compatible as rhel7 = centos7 = oracle7 = scientific7 (98%-ish core RPM version compatibility
# and the version numbers MUST track the upstream). The appropriate EPEL version repo should work nearly perfectly. Some variation like the
@@ -278,6 +278,9 @@ Ohai.plugin(:Platform) do
elsif lsb[:id] =~ /XenServer/i
platform "xenserver"
platform_version lsb[:release]
+ elsif lsb[:id] =~ /XCP/i
+ platform "xcp"
+ platform_version lsb[:release]
elsif lsb[:id] # LSB can provide odd data that changes between releases, so we currently fall back on it rather than dealing with its subtleties
platform lsb[:id].downcase
platform_version lsb[:release]