summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/aktualizr-auto-prov.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr-auto-prov.bb')
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov.bb20
1 files changed, 6 insertions, 14 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
index 9fa95ed..65e89bd 100644
--- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
@@ -6,7 +6,8 @@ LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" 6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7 7
8DEPENDS = "aktualizr-native zip-native" 8DEPENDS = "aktualizr-native zip-native"
9RDEPENDS_${PN} = "aktualizr" 9RDEPENDS_${PN}_append = "${@' aktualizr-auto-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS', True) == '1' else ''}"
10RDEPENDS_${PN} = " aktualizr"
10PV = "1.0" 11PV = "1.0"
11PR = "6" 12PR = "6"
12 13
@@ -31,19 +32,10 @@ do_install() {
31 32
32 install -m 0700 -d ${D}${libdir}/sota/conf.d 33 install -m 0700 -d ${D}${libdir}/sota/conf.d
33 install -m 0700 -d ${D}${localstatedir}/sota 34 install -m 0700 -d ${D}${localstatedir}/sota
34 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 35 aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)}
35 aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} 36
36 37 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \
37 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ 38 ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}
38 ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}
39
40 # deploy SOTA credentials
41 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
42 cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip
43 # Device should not be able to push data to treehub
44 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json
45 fi
46 fi
47} 39}
48 40
49FILES_${PN} = " \ 41FILES_${PN} = " \