Browse files

fix some silly mistakes

  • Loading branch information...
1 parent d8b5c6c commit fa8da16bac68930f4390b007769407f0a32e3c46 @phunehehe committed Oct 3, 2012
Showing with 11 additions and 17 deletions.
  1. +2 −0 postfix/templates/default/main.cf.erb
  2. +5 −8 postgresql/recipes/server_redhat91.rb
  3. +4 −9 yum/recipes/atrpms.rb
View
2 postfix/templates/default/main.cf.erb
@@ -16,7 +16,9 @@ inet_protocols = <%= postfix[:inet_protocols] %>
mailbox_size_limit = 0
mydestination = <%= postfix[:myhostname] %>, <%= node[:hostname] %>, localhost.localdomain, localhost
+<% if postfix[:mydomain] -%>
mydomain = <%= postfix[:mydomain] %>
+<% end -%>
myhostname = <%= postfix[:myhostname] %>
mynetworks = <%= postfix[:mail_relay_networks].join(', ') %>
myorigin = <%= postfix[:myorigin] %>
View
13 postgresql/recipes/server_redhat91.rb
@@ -96,14 +96,11 @@
end
end
-cron 'postgresql-clear-old-wal' do
- hour node[:postgresql][:cron_time][:clear_wal]
- minute '0'
- command "find #{archive_dir} -type f -ctime +0 -delete"
- if node[:postgresql][:config][:archive_mode] == 'on'
- action :create
- else
- action :delete
+if node[:postgresql][:config][:archive_mode] == 'on'
+ cron 'postgresql-clear-old-wal' do
+ hour node[:postgresql][:cron_time][:clear_wal]
+ minute '0'
+ command "find #{archive_dir} -type f -ctime +0 -delete"
end
end
View
13 yum/recipes/atrpms.rb
@@ -13,16 +13,16 @@
action :remove
end
-key = "#{node.platform}#{node.platform_version.to_i}-#{`uname -m | grep 64` ? '64' : '32'}"
+key = "#{node.platform}#{node.platform_version.to_i}-#{system('uname -m | grep 64') ? 64 : 32}"
case key
when 'centos6-64', 'redhat6-64'
url = 'http://dl.atrpms.net/all/atrpms-repo-6-5.el6.x86_64.rpm'
-when 'redhat6-32', 'redhat6-32'
+when 'centos6-32', 'redhat6-32'
url = 'http://dl.atrpms.net/all/atrpms-repo-6-5.el6.i686.rpm'
-when 'redhat5-64', 'redhat5-64'
+when 'centos5-64', 'redhat5-64'
url = 'http://dl.atrpms.net/all/atrpms-repo-5-5.el5.x86_64.rpm'
-when 'redhat5-32', 'redhat5-32'
+when 'centos5-32', 'redhat5-32'
url = 'http://dl.atrpms.net/all/atrpms-repo-5-5.el5.i386.rpm'
else
raise NotImplementedError
@@ -38,8 +38,3 @@
execute 'install atrpms' do
command "yum install -y #{rpm_file}"
end
-
-#template '/etc/yum.repos.d/atrpms-testing.repo' do
-# mode '0644'
-# source 'atrpms-testing.repo'
-#end

0 comments on commit fa8da16

Please sign in to comment.