diff options
author | Peter Meier <peter.meier@immerda.ch> | 2009-05-21 12:42:28 +0200 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-05-22 09:27:52 +1000 |
commit | 99f666f31c79c6c163881f3f664e59707a176753 (patch) | |
tree | 560a5fdb0f74371ec99fb1bb385a299d63912545 /lib | |
parent | e13befa963323dfcd4b6d8e14b0f6980946b7e1b (diff) | |
download | puppet-99f666f31c79c6c163881f3f664e59707a176753.tar.gz puppet-99f666f31c79c6c163881f3f664e59707a176753.tar.xz puppet-99f666f31c79c6c163881f3f664e59707a176753.zip |
enable maillist on centos, redhat, fedora
Fedora and RedHat (so CentOS as well) put the mailman data and binaries
in different locations than other systems (looks like the provider
have been mainly for debian so far). For the former os we set
explicit paths for the different used binaries, so this provider works
now as well on those.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/puppet/provider/maillist/mailman.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/puppet/provider/maillist/mailman.rb b/lib/puppet/provider/maillist/mailman.rb index 4e225fe0a..fdb886f56 100755 --- a/lib/puppet/provider/maillist/mailman.rb +++ b/lib/puppet/provider/maillist/mailman.rb @@ -1,10 +1,14 @@ require 'puppet/provider/parsedfile' Puppet::Type.type(:maillist).provide(:mailman) do - commands :list_lists => "list_lists", :rmlist => "rmlist", :newlist => "newlist" - - # This probably won't work for non-Debian installs, but this path is sure not to be in the PATH. - commands :mailman => "/var/lib/mailman/mail/mailman" + if [ "CentOS", "RedHat", "Fedora" ].any? { |os| Facter.value(:operatingsystem) == os } then + commands :list_lists => "/usr/lib/mailman/bin/list_lists", :rmlist => "/usr/lib/mailman/bin/rmlist", :newlist => "/usr/lib/mailman/bin/newlist" + commands :mailman => "/usr/lib/mailman/mail/mailman" + else + # This probably won't work for non-Debian installs, but this path is sure not to be in the PATH. + commands :list_lists => "list_lists", :rmlist => "rmlist", :newlist => "newlist" + commands :mailman => "/var/lib/mailman/mail/mailman" + end mk_resource_methods |