From a5fd0f7acd0ae093e287bc022c09e93db4a2793b Mon Sep 17 00:00:00 2001 From: David MacMillan Date: Fri, 1 Nov 2019 10:16:59 -0300 Subject: [PATCH] fixed transports not using /usr/sbin on RHEL Signed-off-by: David MacMillan --- recipes/transports.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/transports.rb b/recipes/transports.rb index 7386caa..58cb4fe 100644 --- a/recipes/transports.rb +++ b/recipes/transports.rb @@ -15,8 +15,10 @@ include_recipe 'postfix::_common' +postmap_command = platform_family?('rhel') ? '/usr/sbin/postmap' : 'postmap' + execute 'update-postfix-transport' do - command "postmap #{node['postfix']['transport_db']}" + command "#{postmap_command} #{node['postfix']['transport_db']}" environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios') action :nothing end