Fixes for Travis CI

This commit is contained in:
Stanislav Voroniy
2015-09-11 14:37:33 +02:00
parent 1f7c62f8dc
commit c9613ac670
12 changed files with 33 additions and 47 deletions

View File

@@ -3,25 +3,24 @@ require 'serverspec'
set :backend, :exec
set :path, '/sbin:/usr/local/sbin:$PATH'
def get_family
def which_family
fam = 'solaris2'
return fam unless File.exist? '/etc/release'
File.open("/etc/release") do |file|
while line = file.gets
case line
when /^\s*(OmniOS)/
fam = 'omnios'
end
File.open('/etc/release') do |file|
while (line = file.gets)
case line
when /^\s*(OmniOS)/
fam = 'omnios'
end
end
end
fam
end
def postfix_conf_path
if os[:family] == 'solaris' && get_family == 'omnios'
if os[:family] == 'solaris' && which_family == 'omnios'
'/opt/omni/etc/postfix/'
else
'/etc/postfix'
end
end