From 73f3fe3550491e4a825ba017f4a10ec48f524f0b Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Wed, 4 Jan 2023 10:57:03 +0100 Subject: [PATCH] fup --- recipes/alpine/locals.matchbox.pkr.hcl | 5 ++++ .../conf/matchbox/initmatchbox.start | 26 ++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/recipes/alpine/locals.matchbox.pkr.hcl b/recipes/alpine/locals.matchbox.pkr.hcl index b2b61d5..5f5ab3f 100644 --- a/recipes/alpine/locals.matchbox.pkr.hcl +++ b/recipes/alpine/locals.matchbox.pkr.hcl @@ -89,6 +89,11 @@ locals { type = "auto" enabled = true } + local = { + name = "local" + type = "auto" + enabled = true + } } } diff --git a/recipes/alpine/provisionning/conf/matchbox/initmatchbox.start b/recipes/alpine/provisionning/conf/matchbox/initmatchbox.start index e7feaf7..9180b96 100644 --- a/recipes/alpine/provisionning/conf/matchbox/initmatchbox.start +++ b/recipes/alpine/provisionning/conf/matchbox/initmatchbox.start @@ -4,16 +4,22 @@ FL_VERSIONS="current 3374.2.0" MATCHBOX_DIR="/var/lib/matchbox" ASSETS_DIR="${MATCHBOX_DIR}/assets/" +GPG_FNAME="Flatcar_Image_Signing_Key.asc" +GPG_KEYS_URL="https://www.flatcar.org/security/image-signing-key/" + +cd /tmp +curl -L -O ${GPG_KEYS_URL}/${GPG_FNAME} +gpg --import --keyid-format LONG ${GPG_FNAME} +cd - + echo "Provisionning matchbox with flatcar images" -echo " * Current stable image (try 1)" +tout=30 for version in ${FL_VERSIONS}; do - while ! bash -x /usr/local/bin/get-flatcar stable ${version} ${ASSETS_DIR}; do - sleep 1 - echo " * ${version} stable image (try ${item})" - if [ "${tout}" -eq "${item}" ]; then - break - exit 1 + for i in $(seq 1 ${tout});do + echo " * ${FL_VERSIONS} stable image (try ${i})" + /usr/local/bin/get-flatcar stable ${version} ${ASSETS_DIR} + if [[ "${?}" -eq 0 ]]; then + break fi - item=$((item+1)) - done -done \ No newline at end of file + done +done