diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-05-17 12:22:23 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-05-24 14:26:31 +0200 |
commit | 4cd7635e3a68071f7dc84ebc80d13d3967a25839 (patch) | |
tree | f87b3394c91d39ab7b4abf3ad7524a5bceee839f /recipes-sota | |
parent | 550ef5c1c32be58cca91f80afbedc23d5e9b79b6 (diff) | |
download | meta-updater-4cd7635e3a68071f7dc84ebc80d13d3967a25839.tar.gz |
aktualizr-polling-interval: new config fragment.feat/test-polling-interval
Can be used for testing purposes after we increase the default polling
interval in aktualizr. We no longer recommend anything less than an hour
for production use cases, but it's still convenient to poll more
frequently while testing.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/config/aktualizr-polling-interval.bb | 29 | ||||
-rw-r--r-- | recipes-sota/config/files/60-polling-interval.toml | 2 |
2 files changed, 31 insertions, 0 deletions
diff --git a/recipes-sota/config/aktualizr-polling-interval.bb b/recipes-sota/config/aktualizr-polling-interval.bb new file mode 100644 index 0000000..53c008a --- /dev/null +++ b/recipes-sota/config/aktualizr-polling-interval.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Set polling interval in Aktualizr" | ||
2 | DESCRIPTION = "Configures aktualizr to poll at a custom frequency (suitable for testing or other purposes)" | ||
3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "MPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
7 | |||
8 | inherit allarch | ||
9 | |||
10 | SRC_URI = " \ | ||
11 | file://60-polling-interval.toml \ | ||
12 | " | ||
13 | |||
14 | SOTA_POLLING_SEC ?= "30" | ||
15 | |||
16 | do_install_append () { | ||
17 | install -m 0700 -d ${D}${libdir}/sota/conf.d | ||
18 | install -m 0644 ${WORKDIR}/60-polling-interval.toml ${D}${libdir}/sota/conf.d/60-polling-interval.toml | ||
19 | |||
20 | sed -i -e 's|@POLLING_SEC@|${SOTA_POLLING_SEC}|g' \ | ||
21 | ${D}${libdir}/sota/conf.d/60-polling-interval.toml | ||
22 | } | ||
23 | |||
24 | FILES_${PN} = " \ | ||
25 | ${libdir}/sota/conf.d/60-polling-interval.toml \ | ||
26 | " | ||
27 | |||
28 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
29 | |||
diff --git a/recipes-sota/config/files/60-polling-interval.toml b/recipes-sota/config/files/60-polling-interval.toml new file mode 100644 index 0000000..7d25d05 --- /dev/null +++ b/recipes-sota/config/files/60-polling-interval.toml | |||
@@ -0,0 +1,2 @@ | |||
1 | [uptane] | ||
2 | polling_sec = @POLLING_SEC@ | ||