diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-03 19:46:01 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-03 19:46:01 +0000 |
| commit | c3b7d62cc5271d3cd263e7e2b5728fac0c3fe0f2 (patch) | |
| tree | 750471e3b82f46198a4c62cd29ac01c9fcc6b102 /lib | |
| parent | caaa331906ca224bd356d2f90d68b06c5ec0828f (diff) | |
| download | puppet-c3b7d62cc5271d3cd263e7e2b5728fac0c3fe0f2.tar.gz puppet-c3b7d62cc5271d3cd263e7e2b5728fac0c3fe0f2.tar.xz puppet-c3b7d62cc5271d3cd263e7e2b5728fac0c3fe0f2.zip | |
Bugfixes for OS X. I had to do some shenanigans on type/file/ensure.rb -- it was testing whether the parent dir was writeable on object creation, and if not it was not setting ownership and such, so i added some post-creation checks that will fix ownership if it was not set correctly at creation time.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1058 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/nameservice/netinfo.rb | 5 | ||||
| -rwxr-xr-x | lib/puppet/type/pfile/ensure.rb | 18 |
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 |
