summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-02 20:28:45 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-02 20:28:45 +0000
commit343dd08a4ab84bdc6947239e8c514752db219c2a (patch)
tree438f144f98a56ef6e35e4c4b670318f15c81eb31 /lib
parent1a93c822667e6990b45f843e56d8976c51517671 (diff)
downloadpuppet-343dd08a4ab84bdc6947239e8c514752db219c2a.tar.gz
puppet-343dd08a4ab84bdc6947239e8c514752db219c2a.tar.xz
puppet-343dd08a4ab84bdc6947239e8c514752db219c2a.zip
Fixing tests so they do not chmod /dev/null to 640 (stupid tests).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@967 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/config.rb1
-rw-r--r--lib/puppet/type/nameservice/pw.rb4
-rw-r--r--lib/puppet/util.rb1
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb
index e38e26517..ff6dd9cbf 100644
--- a/lib/puppet/config.rb
+++ b/lib/puppet/config.rb
@@ -336,6 +336,7 @@ class Config
end
if obj.respond_to? :to_transportable
+ next if obj.value =~ /^\/dev/
transobjects = obj.to_transportable
transobjects = [transobjects] unless transobjects.is_a? Array
transobjects.each do |trans|
diff --git a/lib/puppet/type/nameservice/pw.rb b/lib/puppet/type/nameservice/pw.rb
index 421472149..4f2a1c7b2 100644
--- a/lib/puppet/type/nameservice/pw.rb
+++ b/lib/puppet/type/nameservice/pw.rb
@@ -18,7 +18,7 @@ module Puppet
# Does the object already exist?
def self.exists?(obj)
- if obj.getinfo
+ if obj.getinfo(true)
return true
else
return false
@@ -33,7 +33,7 @@ module Puppet
cmd = ["pw", "groupadd", @parent[:name]]
if gid = @parent.should(:gid)
unless gid == :auto
- cmd << self.class.objectaddflag << gid
+ cmd << @parent.state(:gid).class.objectaddflag << gid
end
end
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index fd283539b..1d4515b3d 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -284,6 +284,7 @@ module Util
end
end
+ # Execute a given chunk of code with a new umask.
def self.withumask(mask)
cur = File.umask(mask)