Created
March 16, 2010 10:40
-
-
Save redivy/333836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ohai.0.5.platform.rb 2010-03-16 13:31:56.000000000 +0300 | |
+++ /usr/lib64/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/plugins/linux/platform.rb 2010-03-16 13:38:21.000000000 +0300 | |
@@ -42,7 +42,7 @@ | |
platform_version IO.read('/etc/gentoo-release').scan(/(\d+|\.+)/).join | |
elsif File.exists?('/etc/SuSE-release') | |
platform "suse" | |
- platform_version IO.read('/etc/SuSE-release').scan(/\d+\.\d+/)[0] | |
+ platform_version IO.read('/etc/SuSE-release').scan(/version\D+([\d\.]+)\s+patchlevel\D+([\d\.]+)/i).join('.') | |
elsif File.exists?('/etc/arch-release') | |
platform "arch" | |
# no way to determine platform_version in a rolling release distribution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment