Codebase list facter / b9cb915
Move xenu detection fix to a quilt patch The Debian packaging tools are no longer happy with upstream fixes in the packaging branch. It must be a quilt patch or a gitpkg patch branch. This also reverts commit 00fb8c9198d237cc3f47ebd9d87a2a61ddd60598. Stig Sandbeck Mathisen 11 years ago
3 changed file(s) with 32 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
00 no-require-rubygems
1 virtual-xenu-detection
0 From 00fb8c9198d237cc3f47ebd9d87a2a61ddd60598 Mon Sep 17 00:00:00 2001
1 From: Grant Heffernan <heffergm@gmail.com>
2 Date: Wed, 1 Feb 2012 18:38:29 -0500
3 Subject: [PATCH 005/132] fix xen0/xenu detection:
4 https://projects.puppetlabs.com/issues/10625
5
6 ---
7 lib/facter/virtual.rb | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
9
10 diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
11 index ea9e1bd..652e528 100644
12 --- a/lib/facter/virtual.rb
13 +++ b/lib/facter/virtual.rb
14 @@ -73,9 +73,9 @@ Facter.add("virtual") do
15 end
16
17 if Facter::Util::Virtual.xen?
18 - if FileTest.exists?("/proc/xen/xsd_kva")
19 + if FileTest.exists?("/dev/xen/evtchn")
20 result = "xen0"
21 - elsif FileTest.exists?("/proc/xen/capabilities")
22 + elsif FileTest.exists?("/proc/xen")
23 result = "xenu"
24 end
25 end
26 --
27 1.7.10.4
28
7272 end
7373
7474 if Facter::Util::Virtual.xen?
75 if FileTest.exists?("/dev/xen/evtchn")
75 if FileTest.exists?("/proc/xen/xsd_kva")
7676 result = "xen0"
77 elsif FileTest.exists?("/proc/xen")
77 elsif FileTest.exists?("/proc/xen/capabilities")
7878 result = "xenu"
7979 end
8080 end