From 68436312e13b116121f2dae07f34eaa1988f16b9 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 21 Feb 2019 17:22:50 +0100 Subject: aktualizr-auto-prov-creds: remove API Gateway URL if it exists. It will only be used by garage-sign. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb index 34460af..0628a61 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb @@ -11,9 +11,14 @@ require credentials.inc do_install() { if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then install -m 0700 -d ${D}${localstatedir}/sota - cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip + cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip # Device should not be able to push data to treehub zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json + # Device has no use for the API Gateway. Remove if present. See: + # https://github.com/advancedtelematic/ota-plus-server/pull/1913/ + if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then + zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url + fi fi } -- cgit v1.2.3-54-g00ecf