aboutsummaryrefslogtreecommitdiff
path: root/plugins/facter/vserver.rb
diff options
context:
space:
mode:
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
-