diff options
| author | James Turnbull <james@lovedthanlost.net> | 2009-02-11 08:48:27 +1100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-02-11 08:48:27 +1100 |
| commit | 535fa89af0b87f1d514d75040c1da7795d1dc87e (patch) | |
| tree | 7342e61e5e897fa51de5b9b6fc29627024c85a42 /lib | |
| parent | f7b04dfc7e7859bf80243a39f778c32baa67061b (diff) | |
| download | puppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.tar.gz puppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.tar.xz puppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.zip | |
Fixed #1538 - Yumrepo sets permissions wrongly on files in /etc/yum.repos.d
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/yumrepo.rb | 5 | ||||
| -rw-r--r-- | lib/puppet/util/inifile.rb | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb index 15e031945..164deaffc 100644 --- a/lib/puppet/type/yumrepo.rb +++ b/lib/puppet/type/yumrepo.rb @@ -177,7 +177,10 @@ module Puppet # Store all modifications back to disk def self.store - inifile.store + file = inifile.store + unless file.nil? + File.chmod(0644, file) + end end def self.clear diff --git a/lib/puppet/util/inifile.rb b/lib/puppet/util/inifile.rb index 9f5582e95..f5fab8530 100644 --- a/lib/puppet/util/inifile.rb +++ b/lib/puppet/util/inifile.rb @@ -163,6 +163,7 @@ module Puppet::Util::IniConfig end if dirty Puppet::Util::FileType.filetype(:flat).new(file).write(text) + return file end end end |
