diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | lib/facter/virtual.rb | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -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 |