diff options
author | James Turnbull <james@lovedthanlost.net> | 2009-05-10 19:06:20 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-05-10 21:51:15 +1000 |
commit | 8768371511d081555db63a89be7c1a17a69f4e0c (patch) | |
tree | 6d9530ba18ce8c8760e7b59fbdf350136f8afa8c | |
parent | 23a5b3db4f73e85c34dc917bc191f37b31910dcb (diff) | |
download | facter-8768371511d081555db63a89be7c1a17a69f4e0c.tar.gz facter-8768371511d081555db63a89be7c1a17a69f4e0c.tar.xz facter-8768371511d081555db63a89be7c1a17a69f4e0c.zip |
Fixed #2119 - Added support for non-global Solaris 10 zones
-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 |