mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
overlay coreos-base/common-oem-files: translate ami to ec2
For this vendor, the OEM ID from the oem-release file is different from the oem.id kernel commandline parameter. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
79b07511e3
commit
bfaea38865
@ -29,7 +29,7 @@ BDEPEND="
|
|||||||
"
|
"
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
local oemid package ebuild version name homepage lines
|
local oemid package ebuild version name homepage lines oemid_cmdline
|
||||||
|
|
||||||
for oemid in "${OEMIDS[@]}"; do
|
for oemid in "${OEMIDS[@]}"; do
|
||||||
if use "${oemid}"; then break; fi
|
if use "${oemid}"; then break; fi
|
||||||
@ -70,10 +70,19 @@ src_compile() {
|
|||||||
fi
|
fi
|
||||||
} >"${T}/oem-release"
|
} >"${T}/oem-release"
|
||||||
|
|
||||||
|
oemid_cmdline="${oemid}"
|
||||||
|
|
||||||
|
# In this specific case, the OEM ID from the oem-release file ('ami')
|
||||||
|
# is different from the OEM ID kernel command line parameter ('ec2')
|
||||||
|
# because some services like Afterburn or Ignition expects 'ec2|aws' value.
|
||||||
|
if [[ "${oemid}" == "ami" ]]; then
|
||||||
|
oemid_cmdline="ec2"
|
||||||
|
fi
|
||||||
|
|
||||||
lines=(
|
lines=(
|
||||||
'# Flatcar GRUB settings'
|
'# Flatcar GRUB settings'
|
||||||
''
|
''
|
||||||
"set oem_id=\"${oemid}\""
|
"set oem_id=\"${oemid_cmdline}\""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
printf '%s\n' "${lines[@]}"
|
printf '%s\n' "${lines[@]}"
|
Loading…
x
Reference in New Issue
Block a user