lib/ohai/plugins/solaris2/platform.rb in ohai-16.5.6 vs lib/ohai/plugins/solaris2/platform.rb in ohai-16.6.5
- old
+ new
@@ -18,11 +18,11 @@
Ohai.plugin(:Platform) do
provides "platform", "platform_version", "platform_build", "platform_family"
collect_data(:solaris2) do
- if File.exist?("/sbin/uname")
+ if file_exist?("/sbin/uname")
uname_exec = "/sbin/uname"
else
uname_exec = "uname"
end
@@ -33,10 +33,10 @@
when /^KernelID =\s+(.+)$/
platform_build $1
end
end
- File.open("/etc/release") do |file|
+ file_open("/etc/release") do |file|
while ( line = file.gets )
case line
when /^.*(SmartOS).*$/
platform "smartos"
when /^\s*(OmniOS).*r(\d+).*$/