summaryrefslogtreecommitdiffstats
path: root/recipes-sota
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-03-29 13:51:03 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2018-03-29 13:57:58 +0200
commit71c528ab616a707f4125727c8c5a4e4da5a36c94 (patch)
tree5ea8f1929b8951dfafa568732bc5f3023bd17f8a /recipes-sota
parentbca6c0b09593c77d9ac78caae2f7488adb1d90f4 (diff)
downloadmeta-updater-71c528ab616a707f4125727c8c5a4e4da5a36c94.tar.gz
Assorted minor cleanup and formatting.
Includes the suggestion for using /etc/sota/sota.env if it exists as recommended by the discussion here: https://github.com/advancedtelematic/meta-updater/pull/275
Diffstat (limited to 'recipes-sota')
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb3
-rw-r--r--recipes-sota/aktualizr/environment.inc2
-rw-r--r--recipes-sota/aktualizr/files/aktualizr.service1
3 files changed, 4 insertions, 2 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 26ccd72..2a803a8 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -22,7 +22,7 @@ SRC_URI = " \
22 file://aktualizr-secondary.socket \ 22 file://aktualizr-secondary.socket \
23 file://aktualizr-serialcan.service \ 23 file://aktualizr-serialcan.service \
24 " 24 "
25SRCREV = "178ba9985e23d9c3938d87dd5f2cb39f48f61de6" 25SRCREV = "930d8eef6eb584686654601c056d7c9c6fca3048"
26BRANCH ?= "master" 26BRANCH ?= "master"
27 27
28S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"
@@ -50,6 +50,7 @@ do_install_append () {
50 install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket 50 install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket
51 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service 51 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service
52} 52}
53
53do_install_append_class-target () { 54do_install_append_class-target () {
54 install -d ${D}${systemd_unitdir}/system 55 install -d ${D}${systemd_unitdir}/system
55 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} 56 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)}
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc
index cba77e7..09da6b7 100644
--- a/recipes-sota/aktualizr/environment.inc
+++ b/recipes-sota/aktualizr/environment.inc
@@ -3,7 +3,7 @@ export SOTA_VIRTUAL_SECONDARIES
3 3
4do_install_append() { 4do_install_append() {
5 if [ -n "${SOTA_LEGACY_SECONDARY_INTERFACE}" ]; then 5 if [ -n "${SOTA_LEGACY_SECONDARY_INTERFACE}" ]; then
6 AKTUALIZR_PARAMETERS_LEGACYSEC="--legacy-interface ${SOTA_LEGACY_SECONDARY_INTERFACE}"; 6 AKTUALIZR_PARAMETERS_LEGACYSEC="--legacy-interface ${SOTA_LEGACY_SECONDARY_INTERFACE}"
7 fi 7 fi
8 8
9 AKTUALIZR_PARAMETERS_CONFIGFILE="--config /usr/lib/sota/sota.toml" 9 AKTUALIZR_PARAMETERS_CONFIGFILE="--config /usr/lib/sota/sota.toml"
diff --git a/recipes-sota/aktualizr/files/aktualizr.service b/recipes-sota/aktualizr/files/aktualizr.service
index b6df9d7..1c2e1df 100644
--- a/recipes-sota/aktualizr/files/aktualizr.service
+++ b/recipes-sota/aktualizr/files/aktualizr.service
@@ -8,6 +8,7 @@ Requires=network-online.target
8RestartSec=10 8RestartSec=10
9Restart=always 9Restart=always
10EnvironmentFile=/usr/lib/sota/sota.env 10EnvironmentFile=/usr/lib/sota/sota.env
11EnvironmentFile=-/etc/sota/sota.env
11ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS 12ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS
12 13
13[Install] 14[Install]