Signed-off-by: James Turnbull <[email protected]>
---
 lib/facter/virtual.rb |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 3ad6f8a..393a1de 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -18,15 +18,11 @@ Facter.add("virtual") do
             end
         end
 
-        Thread::exclusive do
-            if FileTest.exists?("/proc/xen/capabilities") && 
FileTest.readable?("/proc/xen/capabilities")
-                txt = File.read("/proc/xen/capabilities")
-                    if txt =~ /control_d/i
-                        result = "xen0"
-                    else
-                        result = "xenu"
-                    end
-             end
+        # xen
+        if File.exists?("/proc/xen/capabilities") && 
FileTest.readable?("/proc/xen/capabilities") && 
File.read("/proc/xen/capabilities") =~ /control_d/i
+            result="xen0"
+        elsif File.exists?("/proc/sys/xen/independent_wallclock")
+            result="xenu"
         end
 
         if result == "physical"
-- 
1.6.0.6


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to