summaryrefslogtreecommitdiffstats
path: root/recipes-test/demo-config/secondary-config.bb
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-06-07 11:25:27 +0200
committerGitHub <noreply@github.com>2019-06-07 11:25:27 +0200
commit9b95f510e11ef18e54f57fd5fae66ea703a526dd (patch)
treeeb2d9449f4762de77ece3f17eaf7375b1a4fa447 /recipes-test/demo-config/secondary-config.bb
parent1ca755e32215de0a54d9bb221be862391b6c6756 (diff)
parent70fc854d599e58959e98647a8bc25ea519c5b700 (diff)
downloadmeta-updater-9b95f510e11ef18e54f57fd5fae66ea703a526dd.tar.gz
Merge pull request #527 from advancedtelematic/refactor/sumo/renaming-secondaries-etc
Refactor/sumo/renaming secondaries etc
Diffstat (limited to 'recipes-test/demo-config/secondary-config.bb')
-rw-r--r--recipes-test/demo-config/secondary-config.bb41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-test/demo-config/secondary-config.bb b/recipes-test/demo-config/secondary-config.bb
new file mode 100644
index 0000000..9411646
--- /dev/null
+++ b/recipes-test/demo-config/secondary-config.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "Sample configuration for an Uptane Secondary"
2LICENSE = "MPL-2.0"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
4
5require shared-conf.inc
6
7SECONDARY_SERIAL_ID ?= ""
8SOTA_HARDWARE_ID ?= "${MACHINE}-sndry"
9SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}"
10
11SRC_URI = "\
12 file://30-fake-pacman.toml \
13 file://35-network-config.toml \
14 file://45-id-config.toml \
15 "
16
17do_install () {
18 install -m 0700 -d ${D}${libdir}/sota/conf.d
19 install -m 0644 ${WORKDIR}/30-fake-pacman.toml ${D}/${libdir}/sota/conf.d/30-fake-pacman.toml
20
21 install -m 0644 ${WORKDIR}/35-network-config.toml ${D}/${libdir}/sota/conf.d/35-network-config.toml
22 sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \
23 -e 's|@PRIMARY_IP@|${PRIMARY_IP}|g' \
24 -e 's|@PRIMARY_PORT@|${PRIMARY_PORT}|g' \
25 ${D}/${libdir}/sota/conf.d/35-network-config.toml
26
27 install -m 0644 ${WORKDIR}/45-id-config.toml ${D}/${libdir}/sota/conf.d/45-id-config.toml
28 sed -i -e 's|@SERIAL@|${SECONDARY_SERIAL_ID}|g' \
29 -e 's|@HWID@|${SECONDARY_HARDWARE_ID}|g' \
30 ${D}/${libdir}/sota/conf.d/45-id-config.toml
31
32}
33
34FILES_${PN} = " \
35 ${libdir}/sota/conf.d \
36 ${libdir}/sota/conf.d/30-fake-pacman.toml \
37 ${libdir}/sota/conf.d/35-network-config.toml \
38 ${libdir}/sota/conf.d/45-id-config.toml \
39 "
40
41# vim:set ts=4 sw=4 sts=4 expandtab: