lib/ohai/plugins/solaris2/virtualization.rb in ohai-8.8.1 vs lib/ohai/plugins/solaris2/virtualization.rb in ohai-8.9.0

- old
+ new

@@ -1,9 +1,9 @@ # # Author:: Sean Walbran (<seanwalbran@gmail.com>) # Author:: Kurt Yoder (<ktyopscode@yoderhome.com>) -# Copyright:: Copyright (c) 2009 Opscode, Inc. +# Copyright:: Copyright (c) 2009-2016 Chef Software, Inc. # Copyright:: Copyright (c) 2010 Kurt Yoder # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ smbios_path= Ohai.abs_path( "/usr/sbin/smbios" ) if File.exists?(smbios_path) so = shell_out(smbios_path) case so.stdout when /Manufacturer: Microsoft/ - if so.stdout =~ /Product: Virtual Machine/ + if so.stdout =~ /Product: Virtual Machine/ virtualization[:system] = "virtualpc" virtualization[:role] = "guest" - end + end when /Manufacturer: VMware/ - if so.stdout =~ /Product: VMware Virtual Platform/ + if so.stdout =~ /Product: VMware Virtual Platform/ virtualization[:system] = "vmware" virtualization[:role] = "guest" end else nil @@ -72,10 +72,10 @@ 'uuid' => info[4], 'brand' => info[5], 'ip' => info[6], } end - + if (zones.length == 1) first_zone = zones.keys[0] unless( first_zone == 'global') virtualization[:system] = 'zone' virtualization[:role] = 'guest'