diff options
| author | Patrick Vacek <patrickvacek@gmail.com> | 2019-02-21 17:22:50 +0100 |
|---|---|---|
| committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-02-21 17:23:31 +0100 |
| commit | 0f99487cd615df24486a9f0484e8169f2c315eb5 (patch) | |
| tree | 7c132198f888440066f1890a083c0638959adcfb | |
| parent | 3b9b75140ea58f546829cb3cf1b234e5b650de77 (diff) | |
| download | meta-updater-0f99487cd615df24486a9f0484e8169f2c315eb5.tar.gz | |
aktualizr-auto-prov-creds: remove API Gateway URL if it exists.fix/rm-api-gateway-url
It will only be used by garage-sign.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
| -rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb | 7 |
1 files changed, 6 insertions, 1 deletions
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 | |||
| 11 | do_install() { | 11 | do_install() { |
| 12 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 12 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
| 13 | install -m 0700 -d ${D}${localstatedir}/sota | 13 | install -m 0700 -d ${D}${localstatedir}/sota |
| 14 | cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip | 14 | cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip |
| 15 | # Device should not be able to push data to treehub | 15 | # Device should not be able to push data to treehub |
| 16 | zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json | 16 | zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json |
| 17 | # Device has no use for the API Gateway. Remove if present. See: | ||
| 18 | # https://github.com/advancedtelematic/ota-plus-server/pull/1913/ | ||
| 19 | if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then | ||
| 20 | zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url | ||
| 21 | fi | ||
| 17 | fi | 22 | fi |
| 18 | } | 23 | } |
| 19 | 24 | ||
