* Cookstyle 7.26.1 Fixes Issues found and resolved with: test/integration/helpers/serverspec/spec_helper.rb - 9:21 convention: Style/FileRead - Use File.read. https://rubystyle.guidefile-read Signed-off-by: kitchen-porter <board@sous-chefs.org> * Update CHANGELOG.md * Use correct path for systemd on OpenSUSE Signed-off-by: Lance Albertson <lance@osuosl.org> Co-authored-by: Jason Field <Jason@avon-lea.co.uk> Co-authored-by: Lance Albertson <lance@osuosl.org>
20 lines
375 B
Ruby
20 lines
375 B
Ruby
require 'serverspec'
|
|
|
|
set :backend, :exec
|
|
set :path, '/sbin:/usr/local/sbin:$PATH'
|
|
|
|
def family
|
|
fam = 'solaris2'
|
|
return fam unless File.exist? '/etc/release'
|
|
fam = 'omnios' if File.read('/etc/release') =~ /^\s*(OmniOS)/
|
|
fam
|
|
end
|
|
|
|
def postfix_conf_path
|
|
if os[:family] == 'solaris' && family == 'omnios'
|
|
'/opt/omni/etc/postfix/'
|
|
else
|
|
'/etc/postfix'
|
|
end
|
|
end
|