summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2018-09-05 16:22:07 +0200
committerAnton Gerasimov <tossel@gmail.com>2018-10-01 10:44:50 +0200
commit673a4b91d1794b7c89265ba3dd62febf8826e14f (patch)
tree49de996c62afdc0d8719588bc8a67981a808f20a /recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
parent9476fa542cc7bc7695c58b54398b104f8e7023b6 (diff)
downloadmeta-updater-673a4b91d1794b7c89265ba3dd62febf8826e14f.tar.gz
Add SOTA_DEPLOY_CREDENTIALS variable to control whether the built image should be provisioned
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb')
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb23
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
new file mode 100644
index 0000000..d964a0a
--- /dev/null
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Credentials for autoprovisioning scenario"
2SECTION = "base"
3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
5
6DEPENDS = "aktualizr-native zip-native"
7
8require credentials.inc
9
10do_install() {
11 if [ -n ${SOTA_PACKED_CREDENTIALS} ]; then
12 install -m 0700 -d ${D}${localstatedir}/sota
13 cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip
14 # Device should not be able to push data to treehub
15 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json
16 fi
17}
18
19FILES_${PN} = " \
20 ${localstatedir}/sota/sota_provisioning_credentials.zip \
21 "
22
23# vim:set ts=4 sw=4 sts=4 expandtab: