lib/ohai/plugins/linux/platform.rb in ohai-0.5.0 vs lib/ohai/plugins/linux/platform.rb in ohai-0.5.2
- old
+ new
@@ -40,10 +40,10 @@
elsif File.exists?('/etc/gentoo-release')
platform "gentoo"
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 File.read("/etc/SuSE-release").scan(/VERSION = (\d+)\nPATCHLEVEL = (\d+)/).flatten.join(".")
elsif File.exists?('/etc/arch-release')
platform "arch"
# no way to determine platform_version in a rolling release distribution
# kernel release will be used - ex. 2.6.32-ARCH
end