aboutsummaryrefslogtreecommitdiff
path: root/plugins/facter/vserver.rb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2009-07-03 10:41:02 -0400
committerMicah Anderson <micah@riseup.net>2009-07-03 10:41:02 -0400
commit2d8407aba6d63a3063da5dcd4a152606cc52b151 (patch)
tree1fe44e091703e240ecc266825cc94b1d4c097dd4 /plugins/facter/vserver.rb
parent52f8e37678789a6c94efe8efaf40efc4e7de7388 (diff)
downloadpuppet-virtual-2d8407aba6d63a3063da5dcd4a152606cc52b151.tar.gz
puppet-virtual-2d8407aba6d63a3063da5dcd4a152606cc52b151.tar.bz2
the virtual facts no longer need to be added because the newer facter includes them (and more)
Diffstat (limited to 'plugins/facter/vserver.rb')
-rw-r--r--plugins/facter/vserver.rb29
1 files changed, 0 insertions, 29 deletions
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 <david@schmitt.edv-bus.at>
-# 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
-