equal
deleted
inserted
replaced
|
1 Patch for FACT-660 Facter on Solaris 11.2+ should report if zones are supported |
|
2 Upstream bug: https://tickets.puppetlabs.com/browse/FACT-660 |
|
3 --- facter-2.1.0/lib/facter/util/solaris_zones.rb.orig 2014-08-19 13:49:14.721574641 -0600 |
|
4 +++ facter-2.1.0/lib/facter/util/solaris_zones.rb 2014-08-19 13:50:03.475818042 -0600 |
|
5 @@ -156,3 +156,29 @@ |
|
6 end |
|
7 end |
|
8 end |
|
9 + |
|
10 +Facter.add("kernel_zone") do |
|
11 + confine :operatingsystem => :Solaris |
|
12 + setcode do |
|
13 + virtinfo = %x{/sbin/virtinfo list -H -o class kernel-zone 2>/dev/null} |
|
14 + case virtinfo.chomp! |
|
15 + when "supported", "current", "parent" |
|
16 + virtinfo |
|
17 + else |
|
18 + "unsupported" |
|
19 + end |
|
20 + end |
|
21 +end |
|
22 + |
|
23 +Facter.add("non_global_zone") do |
|
24 + confine :operatingsystem => :Solaris |
|
25 + setcode do |
|
26 + virtinfo = %x{/sbin/virtinfo list -H -o class non-global-zone 2>/dev/null} |
|
27 + case virtinfo.chomp! |
|
28 + when "supported", "current" |
|
29 + virtinfo |
|
30 + else |
|
31 + "unsupported" |
|
32 + end |
|
33 + end |
|
34 +end |