summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/nameservice/netinfo.rb5
-rwxr-xr-xlib/puppet/type/pfile/ensure.rb18
2 files changed, 18 insertions, 5 deletions
diff --git a/lib/puppet/type/nameservice/netinfo.rb b/lib/puppet/type/nameservice/netinfo.rb
index d7d11c6d3..f0da5294a 100644
--- a/lib/puppet/type/nameservice/netinfo.rb
+++ b/lib/puppet/type/nameservice/netinfo.rb
@@ -144,7 +144,6 @@ module Puppet
# This is really lame. We have to iterate over each
# of the groups and add us to them.
def setgrouplist(groups)
- self.warning "Setting groups to %s" % groups.inspect
# Get just the groups we need to modify
diff = groups - @is
@@ -169,14 +168,10 @@ module Puppet
next
elsif members.include? user
# I'm in the group and shouldn't be
- self.warning "Removing %s from %s" %
- [user, name]
setuserlist(name, members - [user])
elsif groups.include? name
# I'm not in the group and should be
setuserlist(name, members + [user])
- self.warning "Adding %s to %s" %
- [user, name]
else
# I'm not in the group and shouldn't be
next
diff --git a/lib/puppet/type/pfile/ensure.rb b/lib/puppet/type/pfile/ensure.rb
index 4287c9382..8a653e93b 100755
--- a/lib/puppet/type/pfile/ensure.rb
+++ b/lib/puppet/type/pfile/ensure.rb
@@ -131,6 +131,24 @@ module Puppet
end
end
end
+
+ def sync
+ event = super
+
+ # There are some cases where all of the work does not get done on
+ # file creation, so we have to do some extra checking.
+ @parent.each do |thing|
+ next unless thing.is_a? Puppet::State
+ next if thing == self
+
+ thing.retrieve
+ unless thing.insync?
+ thing.sync
+ end
+ end
+
+ return event
+ end
end
end