summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/aktualizr-auto-prov.bb
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-12-06 14:56:50 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2017-12-06 16:53:48 +0100
commit061ac69fbfc8416ea7d4ce4833a84393daf8145d (patch)
treec8637e2af2ca89abb6dfcb4d8debdb46545f1536 /recipes-sota/aktualizr/aktualizr-auto-prov.bb
parentf0c5af044c73a8683fc9ef6ef1a4e79a83e8a6bd (diff)
downloadmeta-updater-061ac69fbfc8416ea7d4ce4833a84393daf8145d.tar.gz
Install /var/sota.
If not using SOTA_PROVISIONING_CREDENTIALS, nothing is written to /var/sota but it is still created. Quick fix: install it.
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr-auto-prov.bb')
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov.bb10
1 files changed, 4 insertions, 6 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
index dd23c06..cee5039 100644
--- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
@@ -39,9 +39,7 @@ do_install() {
39 install -d ${D}${libdir}/sota 39 install -d ${D}${libdir}/sota
40 install -d ${D}${localstatedir}/sota 40 install -d ${D}${localstatedir}/sota
41 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 41 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
42 install -d ${D}/${systemd_unitdir}/system 42 install -m 0644 ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_autoprov.toml ${D}${libdir}/sota/sota.toml
43 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
44 install -m "0644" ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_autoprov.toml ${D}${libdir}/sota/sota.toml
45 43
46 # deploy SOTA credentials 44 # deploy SOTA credentials
47 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then 45 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
@@ -49,14 +47,14 @@ do_install() {
49 # Device should not be able to push data to treehub 47 # Device should not be able to push data to treehub
50 zip -d ${D}/var/sota/sota_provisioning_credentials.zip treehub.json 48 zip -d ${D}/var/sota/sota_provisioning_credentials.zip treehub.json
51 fi 49 fi
52 else
53 install -d ${D}/${systemd_unitdir}/system
54 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
55 fi 50 fi
51 install -d ${D}/${systemd_unitdir}/system
52 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
56} 53}
57 54
58FILES_${PN} = " \ 55FILES_${PN} = " \
59 ${systemd_unitdir}/system/aktualizr.service \ 56 ${systemd_unitdir}/system/aktualizr.service \
60 ${libdir}/sota/sota.toml \ 57 ${libdir}/sota/sota.toml \
58 ${localstatedir}/sota \
61 ${localstatedir}/sota/sota_provisioning_credentials.zip \ 59 ${localstatedir}/sota/sota_provisioning_credentials.zip \
62 " 60 "