|
|
|
|
|
|
|
|
inspec.platform[:release].gsub(/2018.*/, '1') |
|
|
inspec.platform[:release].gsub(/2018.*/, '1') |
|
|
when 'arch' |
|
|
when 'arch' |
|
|
'base-latest' |
|
|
'base-latest' |
|
|
|
|
|
when 'gentoo' |
|
|
|
|
|
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}" |
|
|
else |
|
|
else |
|
|
inspec.platform[:release] |
|
|
inspec.platform[:release] |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def derive_gentoo_init_system |
|
|
|
|
|
case inspec.command('systemctl').exist? |
|
|
|
|
|
when true |
|
|
|
|
|
'sysd' |
|
|
|
|
|
else |
|
|
|
|
|
'sysv' |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
def build_platform_finger |
|
|
def build_platform_finger |
|
|
"#{build_platform_name}-#{build_finger_release}" |
|
|
"#{build_platform_name}-#{build_finger_release}" |
|
|
end |
|
|
end |