diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-06-07 11:25:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-07 11:25:27 +0200 |
commit | 9b95f510e11ef18e54f57fd5fae66ea703a526dd (patch) | |
tree | eb2d9449f4762de77ece3f17eaf7375b1a4fa447 /recipes-test/demo-config/secondary-config.bb | |
parent | 1ca755e32215de0a54d9bb221be862391b6c6756 (diff) | |
parent | 70fc854d599e58959e98647a8bc25ea519c5b700 (diff) | |
download | meta-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.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..9411646 --- /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: | ||