2022-12-28 09:51:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
FL_VERSIONS="current 3374.2.0"
|
|
|
|
MATCHBOX_DIR="/var/lib/matchbox"
|
|
|
|
ASSETS_DIR="${MATCHBOX_DIR}/assets/"
|
|
|
|
|
2023-01-04 10:57:03 +01:00
|
|
|
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 -
|
|
|
|
|
2022-12-28 09:51:38 +01:00
|
|
|
echo "Provisionning matchbox with flatcar images"
|
2023-01-04 10:57:03 +01:00
|
|
|
tout=30
|
2022-12-28 09:51:38 +01:00
|
|
|
for version in ${FL_VERSIONS}; do
|
2023-01-04 10:57:03 +01:00
|
|
|
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
|
2022-12-28 09:51:38 +01:00
|
|
|
fi
|
2023-01-04 10:57:03 +01:00
|
|
|
done
|
|
|
|
done
|