summaryrefslogtreecommitdiff
path: root/lib/ohai
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai')
-rw-r--r--lib/ohai/plugins/linux/platform.rb10
-rw-r--r--lib/ohai/provides_map.rb1
-rw-r--r--lib/ohai/system.rb1
3 files changed, 2 insertions, 10 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index 45f94744..12bc4f7a 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -40,20 +40,14 @@ Ohai.plugin(:Platform) do
contents[/^Red Hat/i] ? "redhat" : contents[/(\w+)/i, 1].downcase
end
- # Amazon Linux AMI release 2013.09
- # Amazon Linux 2
- # Amazon Linux 2 (Karoo)
- # Fedora release 28 (Twenty Eight)
- # CentOS release 5.8 (Final)
- # CentOS release 6.7 (Final)
- # Red Hat Enterprise Linux Server release 7.5 (Maipo)
+ # See https://rubular.com/r/78c1yXYa7zDhdV for example matches
#
# @param contents [String] the contents of /etc/redhat-release
#
# @returns [String] the version string
#
def get_redhatish_version(contents)
- contents[/Rawhide/i] ? contents[/((\d+) \(Rawhide\))/i, 1].downcase : contents[/(release)? ([\d\.]+)/, 2]
+ contents[/(release)? ([\d\.]+)/, 2]
end
#
diff --git a/lib/ohai/provides_map.rb b/lib/ohai/provides_map.rb
index 2bb53d77..e5ed2060 100644
--- a/lib/ohai/provides_map.rb
+++ b/lib/ohai/provides_map.rb
@@ -31,7 +31,6 @@ module Ohai
@map = Mash.new
end
-
# @param [Ohai::DSL::Plugin] plugin
# @param [Array] provided_attributes
#
diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb
index 6a6c7169..6cddf774 100644
--- a/lib/ohai/system.rb
+++ b/lib/ohai/system.rb
@@ -133,7 +133,6 @@ module Ohai
freeze_strings!
end
-
# @param [String] plugin_path
#
# @return [void]