facter-04-FACT-660.patch revision 3333
5403N/APatch for FACT-660 Facter on Solaris 11.2+ should report if zones are supported
5403N/AUpstream bug: https://tickets.puppetlabs.com/browse/FACT-660
5403N/A--- facter-2.1.0/lib/facter/util/solaris_zones.rb.orig 2014-08-19 13:49:14.721574641 -0600
5403N/A+++ facter-2.1.0/lib/facter/util/solaris_zones.rb 2014-08-19 13:50:03.475818042 -0600
5403N/A@@ -156,3 +156,29 @@
5403N/A end
5403N/A end
5403N/A end
5403N/A+
5403N/A+Facter.add("kernel_zone") do
5403N/A+ confine :operatingsystem => :Solaris
5403N/A+ setcode do
5403N/A+ virtinfo = %x{/sbin/virtinfo list -H -o class kernel-zone 2>/dev/null}
5403N/A+ case virtinfo.chomp!
5403N/A+ when "supported", "current", "parent"
5403N/A+ virtinfo
5403N/A+ else
5403N/A+ "unsupported"
5403N/A+ end
5403N/A+ end
5403N/A+end
5403N/A+
5403N/A+Facter.add("non_global_zone") do
5403N/A+ confine :operatingsystem => :Solaris
5403N/A+ setcode do
5403N/A+ virtinfo = %x{/sbin/virtinfo list -H -o class non-global-zone 2>/dev/null}
5403N/A+ case virtinfo.chomp!
5403N/A+ when "supported", "current"
5403N/A+ virtinfo
5403N/A+ else
5403N/A+ "unsupported"
5403N/A+ end
5403N/A+ end
5403N/A+end
5403N/A