From 77fa46babc4150eb90f3fe3f9ea0e84ed8d0c9e2 Mon Sep 17 00:00:00 2001 From: duritong Date: Sun, 22 Feb 2009 01:43:48 +0100 Subject: Fix virtual fact if xen but /proc/virtual present I found a xenu system where /proc/virtual was present, so facter always reported it as vserver_host. This fix will set facter only to vserver_host if the box is still seen as physical, hence no other virtual technology have been detected. --- lib/facter/virtual.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb index ce790c3..8150718 100644 --- a/lib/facter/virtual.rb +++ b/lib/facter/virtual.rb @@ -66,7 +66,7 @@ Facter.add("virtual") do end end - if FileTest.directory?('/proc/virtual') + if FileTest.directory?('/proc/virtual') && result=="physical" result = "vserver_host" end -- cgit