[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
test branch
puppet-dev at googlegroups.com
Wed Jul 14 10:34:16 UTC 2010
The following commit has been merged in the upstream branch:
commit 1645d8e7ca87939bf87e7a5af143af223be71b2a
Author: David Schmitt <david at dasz.at>
Date: Tue May 11 17:03:14 2010 +0200
Define posix and win32 features
diff --git a/lib/puppet/feature/base.rb b/lib/puppet/feature/base.rb
index 1971f14..44a9f3f 100644
--- a/lib/puppet/feature/base.rb
+++ b/lib/puppet/feature/base.rb
@@ -31,3 +31,14 @@ Puppet.features.add(:rrd, :libs => ["RRDtool"])
# We have OpenSSL
Puppet.features.add(:openssl, :libs => ["openssl"])
+
+# We can use POSIX user functions? The require returns false on Windows
+Puppet.features.add(:posix) do
+ require 'etc'
+ Etc.getpwuid(0) != nil
+end
+
+# We can use Win32 functions
+Puppet.features.add(:win32, :libs => ["sys/admin", "win32/process"])
+
+raise Puppet::Error "Cannot determine basic system flavour" unless Puppet.features.posix? or Puppet.features.win32?
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list