Do not run service restart for solaris

Signed-off-by: Jaymala Sinha <jsinha@chef.io>
This commit is contained in:
Jaymala Sinha 2017-11-22 10:20:39 -05:00
parent 518f982af3
commit 797e19dae9

View File

@ -67,7 +67,7 @@ when 'omnios'
execute 'load postfix manifest' do
action :nothing
command "svccfg import #{manifest_path}"
notifies :restart, 'service[postfix]'
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
end
when 'freebsd'
# Actions are based on docs provided by FreeBSD:
@ -80,7 +80,7 @@ when 'freebsd'
source 'mailer.erb'
owner 'root'
group 0
notifies :restart, 'service[postfix]'
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
end
execute 'switch_mailer_to_postfix' do
@ -175,7 +175,10 @@ end
owner 'root'
group node['root_group']
mode '0644'
notifies :restart, 'service[postfix]'
# restart service for solaris on chef-client has a bug
# unless condition can be removed after
# https://github.com/chef/chef/pull/6596 merge/release
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
variables(
lazy { { settings: node['postfix'][cfg] } }
)
@ -185,5 +188,5 @@ end
service 'postfix' do
supports status: true, restart: true, reload: true
action :enable
action [:enable, :start]
end