summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--lib/facter/virtual.rb7
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 274a248..1a0adf2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,8 @@
Fixed #2132 - Support for named interfaces under Linux
+ Fixed #2119 - Added support for non-global Solaris 10 zones
+
Fixed #2080 - IPAddress resolutions should be reordered
Fixed #2078 - ip.rb errors command not found
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 78e5485..907f9ca 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -6,6 +6,13 @@ Facter.add("virtual") do
setcode do
require 'thread'
+ if FileTest.exists?("/sbin/zonename")
+ z = %x{"/sbin/zonename"}.chomp
+ if z != 'global'
+ result = zone
+ end
+ end
+
if FileTest.exists?("/proc/user_beancounters")
# openvz. can be hardware node or virtual environment
# read the init process' status file, it has laxer permissions