summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZee314159 <252806294@qq.com>2019-07-26 08:53:36 +0200
committerZee314159 <252806294@qq.com>2019-07-30 08:20:03 +0200
commit672fcc51d92522c8e2de794ef561e8dd281f7f20 (patch)
tree79b8c768c60090771e6fd448e42504f5273ca429
parent2b6af2ab43c8b82bd2c6146a9273abd9d1875abf (diff)
downloadmeta-updater-672fcc51d92522c8e2de794ef561e8dd281f7f20.tar.gz
Unzip files in tmp directory, updated comments Fixed a zip bug Grouped elements with warnings With a fancier loop Signed-off-by: Zee314159 <252806294@qq.com>
-rw-r--r--recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb19
1 files changed, 11 insertions, 8 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb
index dbb5fde..2701c07 100644
--- a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb
+++ b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb
@@ -14,14 +14,17 @@ require credentials.inc
14do_install() { 14do_install() {
15 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 15 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
16 install -m 0700 -d ${D}${localstatedir}/sota 16 install -m 0700 -d ${D}${localstatedir}/sota
17 cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip 17 # root.json contains the root metadata for bootstrapping the Uptane metadata verification process.
18 # Device should not be able to push data to treehub 18 # autoprov.url has the URL to the device gateway on the server, which is where we send most of our requests.
19 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json 19 # autoprov_credentials.p12 contains the shared provisioning credentials.
20 # Device has no use for the API Gateway. Remove if present. See: 20 for var in root.json autoprov.url autoprov_credentials.p12; do
21 # https://github.com/advancedtelematic/ota-plus-server/pull/1913/ 21 if unzip -l "${SOTA_PACKED_CREDENTIALS}" $var > /dev/null; then
22 if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then 22 unzip "${SOTA_PACKED_CREDENTIALS}" $var -d ${T}
23 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url 23 zip -mj -q ${D}${localstatedir}/sota/sota_provisioning_credentials.zip ${T}/$var
24 fi 24 else
25 bbwarn "$var is missing from credentials.zip"
26 fi
27 done
25 fi 28 fi
26} 29}
27 30