summaryrefslogtreecommitdiffstats
path: root/recipes-test/demo-secondary-config/secondary-config.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-test/demo-secondary-config/secondary-config.bb')
-rw-r--r--recipes-test/demo-secondary-config/secondary-config.bb26
1 files changed, 24 insertions, 2 deletions
diff --git a/recipes-test/demo-secondary-config/secondary-config.bb b/recipes-test/demo-secondary-config/secondary-config.bb
index 3187ff0..b05ab8e 100644
--- a/recipes-test/demo-secondary-config/secondary-config.bb
+++ b/recipes-test/demo-secondary-config/secondary-config.bb
@@ -1,20 +1,42 @@
1DESCRIPTION = "Sample configuration for an Uptane Secondary" 1DESCRIPTION = "Sample configuration for an Uptane Secondary"
2LICENSE = "CLOSED" 2LICENSE = "CLOSED"
3 3
4inherit allarch 4SECONDARY_SERIAL_ID ?= ""
5SOTA_HARDWARE_ID ?= "${MACHINE}-sndry"
6SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}"
7
8SECONDARY_PORT ?= "9050"
9PRIMARY_IP ?= "10.0.3.1"
10PRIMARY_PORT ?= "9040"
5 11
6SRC_URI = "\ 12SRC_URI = "\
7 file://30-fake_pacman.toml \ 13 file://30-fake_pacman.toml \
14 file://35-network_config.toml \
15 file://45-id_config.toml \
8 " 16 "
9 17
10do_install () { 18do_install () {
11 install -m 0700 -d ${D}${libdir}/sota/conf.d 19 install -m 0700 -d ${D}${libdir}/sota/conf.d
12 install -m 0644 ${WORKDIR}/30-fake_pacman.toml ${D}/${libdir}/sota/conf.d/30-fake_pacman.toml 20 install -m 0644 ${WORKDIR}/30-fake_pacman.toml ${D}/${libdir}/sota/conf.d/30-fake_pacman.toml
21
22 install -m 0644 ${WORKDIR}/35-network_config.toml ${D}/${libdir}/sota/conf.d/35-network_config.toml
23 sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \
24 -e 's|@PRIMARY_IP@|${PRIMARY_IP}|g' \
25 -e 's|@PRIMARY_PORT@|${PRIMARY_PORT}|g' \
26 ${D}/${libdir}/sota/conf.d/35-network_config.toml
27
28 install -m 0644 ${WORKDIR}/45-id_config.toml ${D}/${libdir}/sota/conf.d/45-id_config.toml
29 sed -i -e 's|@SERIAL@|${SECONDARY_SERIAL_ID}|g' \
30 -e 's|@HWID@|${SECONDARY_HARDWARE_ID}|g' \
31 ${D}/${libdir}/sota/conf.d/45-id_config.toml
32
13} 33}
14 34
15FILES_${PN} = " \ 35FILES_${PN} = " \
16 ${libdir}/sota/conf.d \ 36 ${libdir}/sota/conf.d \
17 ${libdir}/sota/conf.d/30-fake_pacman.toml \ 37 ${libdir}/sota/conf.d/30-fake_pacman.toml \
38 ${libdir}/sota/conf.d/35-network_config.toml \
39 ${libdir}/sota/conf.d/45-id_config.toml \
18 " 40 "
19 41
20# vim:set ts=4 sw=4 sts=4 expandtab: 42# vim:set ts=4 sw=4 sts=4 expandtab: