diff options
Diffstat (limited to 'recipes-test/demo-config/secondary-config.bb')
-rw-r--r-- | recipes-test/demo-config/secondary-config.bb | 41 |
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..5b213d1 --- /dev/null +++ b/recipes-test/demo-config/secondary-config.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | DESCRIPTION = "Sample configuration for an Uptane Secondary" | ||
2 | LICENSE = "MPL-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
4 | |||
5 | require shared-conf.inc | ||
6 | |||
7 | SECONDARY_SERIAL_ID ?= "" | ||
8 | SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" | ||
9 | SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" | ||
10 | |||
11 | SRC_URI = "\ | ||
12 | file://30-fake_pacman.toml \ | ||
13 | file://35-network_config.toml \ | ||
14 | file://45-id_config.toml \ | ||
15 | " | ||
16 | |||
17 | do_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 | |||
34 | FILES_${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: | ||