From 061ac69fbfc8416ea7d4ce4833a84393daf8145d Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 6 Dec 2017 14:56:50 +0100 Subject: Install /var/sota. If not using SOTA_PROVISIONING_CREDENTIALS, nothing is written to /var/sota but it is still created. Quick fix: install it. --- recipes-sota/aktualizr/aktualizr-auto-prov.bb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'recipes-sota') 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() { install -d ${D}${libdir}/sota install -d ${D}${localstatedir}/sota if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then - install -d ${D}/${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service - install -m "0644" ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_autoprov.toml ${D}${libdir}/sota/sota.toml + install -m 0644 ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_autoprov.toml ${D}${libdir}/sota/sota.toml # deploy SOTA credentials if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then @@ -49,14 +47,14 @@ do_install() { # Device should not be able to push data to treehub zip -d ${D}/var/sota/sota_provisioning_credentials.zip treehub.json fi - else - install -d ${D}/${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service fi + install -d ${D}/${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service } FILES_${PN} = " \ ${systemd_unitdir}/system/aktualizr.service \ ${libdir}/sota/sota.toml \ + ${localstatedir}/sota \ ${localstatedir}/sota/sota_provisioning_credentials.zip \ " -- cgit v1.2.3-54-g00ecf