diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-10-01 16:49:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 16:49:31 +0200 |
commit | a9d43a87ed1cc6b61257299d534b7922644c6ecd (patch) | |
tree | 0dfbf98077d7701343bdda2f61532f5d4b27db43 /recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb | |
parent | 9476fa542cc7bc7695c58b54398b104f8e7023b6 (diff) | |
parent | e689954dc9a07f1ceef65c797056f805daad90a9 (diff) | |
download | meta-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.bb | 24 |
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 @@ | |||
1 | SUMMARY = "Credentials for autoprovisioning scenario" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "MPL-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
5 | |||
6 | DEPENDS = "aktualizr-native zip-native" | ||
7 | ALLOW_EMPTY_${PN} = "1" | ||
8 | |||
9 | require credentials.inc | ||
10 | |||
11 | do_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 | |||
20 | FILES_${PN} = " \ | ||
21 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ | ||
22 | " | ||
23 | |||
24 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||