From bfaea388659a0eed693bc21c1eea7654016a7ba3 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Mon, 25 Sep 2023 11:37:00 +0200 Subject: [PATCH] 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 --- ...-files-0.ebuild => common-oem-files-0-r1.ebuild} | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/{common-oem-files-0.ebuild => common-oem-files-0-r1.ebuild} (82%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild similarity index 82% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild index 63257a37d1b..8442b84a3d8 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild @@ -29,7 +29,7 @@ BDEPEND=" " 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 if use "${oemid}"; then break; fi @@ -70,10 +70,19 @@ src_compile() { fi } >"${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=( '# Flatcar GRUB settings' '' - "set oem_id=\"${oemid}\"" + "set oem_id=\"${oemid_cmdline}\"" ) { printf '%s\n' "${lines[@]}"