diff options
author | Ben Hughes <ben@puppetlabs.com> | 2011-04-07 11:33:09 +1000 |
---|---|---|
committer | Ben Hughes <ben@puppetlabs.com> | 2011-04-07 11:33:09 +1000 |
commit | 19f96b59081558eefd613770fdf8c5f5665a150b (patch) | |
tree | 1819e50f8d1b932e895334e4381884e36c517731 /lib | |
parent | 06eb3f57f48a57881e8dadc19714366eed5add18 (diff) | |
download | facter-19f96b59081558eefd613770fdf8c5f5665a150b.tar.gz facter-19f96b59081558eefd613770fdf8c5f5665a150b.tar.xz facter-19f96b59081558eefd613770fdf8c5f5665a150b.zip |
(#6728) Facter improperly detects openvzve on CloudLinux systems
Make the openvz check for more than just the vz directory to be sure it's
OpenVZ.
Update the OpenVZ fact to be slightly more resilient in it's checking of
OpenVZ, so it doesn't clash with CloudLinux's LVE container system.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/util/virtual.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/util/virtual.rb b/lib/facter/util/virtual.rb index 4355451..8bdde16 100644 --- a/lib/facter/util/virtual.rb +++ b/lib/facter/util/virtual.rb @@ -1,6 +1,6 @@ module Facter::Util::Virtual def self.openvz? - FileTest.directory?("/proc/vz") + FileTest.directory?("/proc/vz") and FileTest.exists?( '/proc/vz/veinfo' ) end def self.openvz_type |