[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, master, updated. debian/1.6.10-1-203-g1dd0cd5
Stig Sandbeck Mathisen
ssm at debian.org
Wed Jan 2 23:53:37 UTC 2013
The following commit has been merged in the master branch:
commit ae3415933e2746b7ac2189824ec09d12279acf0b
Merge: bcb6d64495e215cebc48812b22e0f818ce597d2a 5798143f9db100d16d691635aeb79c3f6e47c5a3
Author: Stig Sandbeck Mathisen <ssm at debian.org>
Date: Thu Jan 3 00:01:48 2013 +0100
Merge tag 'upstream/1.6.17'
Upstream version 1.6.17
# gpg: Signature made Thu 03 Jan 2013 12:01:45 AM CET using DSA key ID FA26E2EE
# gpg: Good signature from "Stig Sandbeck Mathisen <ssm at fnord.no>"
# gpg: aka "Stig Sandbeck Mathisen <ssm at debian.org>"
# gpg: aka "Stig Sandbeck Mathisen <stigsm at gmail.com>"
# gpg: aka "Stig Sandbeck Mathisen <ssm at linpro.no>"
# gpg: aka "Stig Sandbeck Mathisen <ssm at online.no>"
# gpg: aka "Stig Sandbeck Mathisen <ssm at redpill-linpro.com>"
diff --combined lib/facter/virtual.rb
index 652e528,ff85234..b9b1fcb
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@@ -73,9 -73,9 +73,9 @@@ Facter.add("virtual") d
end
if Facter::Util::Virtual.xen?
- if FileTest.exists?("/proc/xen/xsd_kva")
+ if FileTest.exists?("/dev/xen/evtchn")
result = "xen0"
- elsif FileTest.exists?("/proc/xen/capabilities")
+ elsif FileTest.exists?("/proc/xen")
result = "xenu"
end
end
@@@ -89,7 -89,7 +89,7 @@@
end
if result == "physical"
- output = Facter::Util::Resolution.exec('lspci 2>/dev/null')
+ output = Facter::Util::Virtual.lspci
if not output.nil?
output.each_line do |p|
# --- look for the vmware video card to determine if it is virtual => vmware.
@@@ -153,6 -153,39 +153,39 @@@
end
end
+ ##
+ # virtual fact based on virt-what command.
+ #
+ # The output is mapped onto existing known values for the virtual fact in an
+ # effort to preserve consistency. This fact has a high weight becuase the
+ # virt-what tool is expected to be maintained upstream.
+ #
+ # If the virt-what command is not available, this fact will not resolve to a
+ # value and lower-weight virtual facts will be attempted.
+ #
+ # Only the last line of the virt-what command is returned
+ Facter.add("virtual") do
+ has_weight 500
+
+ setcode do
+ output = Facter::Util::Virtual.virt_what
+ case output
+ when 'linux_vserver'
+ Facter::Util::Virtual.vserver_type
+ when /xen-hvm/i
+ 'xenhvm'
+ when /xen-dom0/i
+ 'xen0'
+ when /xen-domU/i
+ 'xenu'
+ when /ibm_systemz/i
+ 'zlinux'
+ else
+ output.to_s.split("\n").last
+ end
+ end
+ end
+
# Fact: is_virtual
#
# Purpose: returning true or false for if a machine is virtualised or not.
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list