From 2d8407aba6d63a3063da5dcd4a152606cc52b151 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 3 Jul 2009 10:41:02 -0400 Subject: the virtual facts no longer need to be added because the newer facter includes them (and more) --- plugins/facter/vserver.rb | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 plugins/facter/vserver.rb (limited to 'plugins/facter/vserver.rb') diff --git a/plugins/facter/vserver.rb b/plugins/facter/vserver.rb deleted file mode 100644 index bd8218d..0000000 --- a/plugins/facter/vserver.rb +++ /dev/null @@ -1,29 +0,0 @@ -# vserver.rb -- linux-vserver.org related facts -# Copyright (C) 2007 David Schmitt -# See LICENSE for the full license granted to you. -# Based on abnormaliti's "virtual" fact from -# http://reductivelabs.com/trac/puppet/wiki/VirtualRecipe - -# This defines the fact "vserver" with the possible values of "none", "guest", -# or "host" - -Facter.add("vserver") do - confine :kernel => :linux - - ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" - - result = "none" - - setcode do - if FileTest.directory?('/proc/virtual') - result = "host" - elsif ! FileTest.directory?('/proc/2') - # gross hack: PID 2 is usually a - # kernel thread, which doesn't existin vserver - result = "guest" - end - - result - end -end - -- cgit v1.2.3