lib/ohai/plugins/linux/platform.rb in ohai-0.6.4 vs lib/ohai/plugins/linux/platform.rb in ohai-0.6.6.rc.0
- old
+ new
@@ -45,9 +45,10 @@
platform "gentoo"
platform_version IO.read('/etc/gentoo-release').scan(/(\d+|\.+)/).join
elsif File.exists?('/etc/SuSE-release')
platform "suse"
platform_version File.read("/etc/SuSE-release").scan(/VERSION = (\d+)\nPATCHLEVEL = (\d+)/).flatten.join(".")
+ platform_version File.read("/etc/SuSE-release").scan(/VERSION = ([\d\.]{2,})/).flatten.join(".") if platform_version == ""
elsif File.exists?('/etc/slackware-version')
platform "slackware"
platform_version File.read("/etc/slackware-version").scan(/(\d+|\.+)/).join
elsif File.exists?('/etc/arch-release')
platform "arch"