summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-10-01 16:49:31 +0200
committerGitHub <noreply@github.com>2018-10-01 16:49:31 +0200
commita9d43a87ed1cc6b61257299d534b7922644c6ecd (patch)
tree0dfbf98077d7701343bdda2f61532f5d4b27db43 /recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
parent9476fa542cc7bc7695c58b54398b104f8e7023b6 (diff)
parente689954dc9a07f1ceef65c797056f805daad90a9 (diff)
downloadmeta-updater-a9d43a87ed1cc6b61257299d534b7922644c6ecd.tar.gz
Merge pull request #383 from advancedtelematic/feat/OTA-719/nodeploy
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.bb24
1 files changed, 24 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..34460af
--- /dev/null
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
@@ -0,0 +1,24 @@
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"
7ALLOW_EMPTY_${PN} = "1"
8
9require credentials.inc
10
11do_install() {
12 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
13 install -m 0700 -d ${D}${localstatedir}/sota
14 cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip
15 # Device should not be able to push data to treehub
16 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json
17 fi
18}
19
20FILES_${PN} = " \
21 ${localstatedir}/sota/sota_provisioning_credentials.zip \
22 "
23
24# vim:set ts=4 sw=4 sts=4 expandtab: