Cookstyle cleanups
Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
2a76f18fba
commit
861b7a2a5d
@ -3,22 +3,15 @@ require 'serverspec'
|
|||||||
set :backend, :exec
|
set :backend, :exec
|
||||||
set :path, '/sbin:/usr/local/sbin:$PATH'
|
set :path, '/sbin:/usr/local/sbin:$PATH'
|
||||||
|
|
||||||
def get_family
|
def family
|
||||||
fam = 'solaris2'
|
fam = 'solaris2'
|
||||||
return fam unless File.exist? '/etc/release'
|
return fam unless File.exist? '/etc/release'
|
||||||
File.open('/etc/release') do |file|
|
fam = 'omnios' if File.open('/etc/release').read =~ /^\s*(OmniOS)/
|
||||||
while line = file.gets
|
|
||||||
case line
|
|
||||||
when /^\s*(OmniOS)/
|
|
||||||
fam = 'omnios'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
fam
|
fam
|
||||||
end
|
end
|
||||||
|
|
||||||
def postfix_conf_path
|
def postfix_conf_path
|
||||||
if os[:family] == 'solaris' && get_family == 'omnios'
|
if os[:family] == 'solaris' && family == 'omnios'
|
||||||
'/opt/omni/etc/postfix/'
|
'/opt/omni/etc/postfix/'
|
||||||
else
|
else
|
||||||
'/etc/postfix'
|
'/etc/postfix'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user