diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2016-12-23 12:34:33 +0100 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2016-12-23 12:34:33 +0100 |
commit | db58e575655be131df4a597d66bfdec2ca128474 (patch) | |
tree | 8a83a7330a61342c777e2b7379dd8d99597932c8 /recipes-sota | |
parent | 96ed051bfbee1d3c01d9ad7a45ad53c672623a24 (diff) | |
download | meta-updater-db58e575655be131df4a597d66bfdec2ca128474.tar.gz |
Deploy credentials to physical sysroot's /boot
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | 6 | ||||
-rw-r--r-- | recipes-sota/sota-credentials/sota-credentials.bb | 27 |
2 files changed, 5 insertions, 28 deletions
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb index 0acc6c6..8ffe7ce 100644 --- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb +++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | |||
@@ -118,7 +118,11 @@ do_install() { | |||
118 | 118 | ||
119 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 119 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
120 | install -d ${D}${systemd_unitdir}/system | 120 | install -d ${D}${systemd_unitdir}/system |
121 | install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system | 121 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'true', 'false', d)}; then |
122 | install -c ${S}/run/sota_client_ostree.service ${D}${systemd_unitdir}/system/sota_client.service | ||
123 | else | ||
124 | install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system/sota_client.service | ||
125 | fi | ||
122 | fi | 126 | fi |
123 | 127 | ||
124 | install -d ${D}${sysconfdir} | 128 | install -d ${D}${sysconfdir} |
diff --git a/recipes-sota/sota-credentials/sota-credentials.bb b/recipes-sota/sota-credentials/sota-credentials.bb deleted file mode 100644 index f523f21..0000000 --- a/recipes-sota/sota-credentials/sota-credentials.bb +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | SUMMARY = "Deploy SOTA credentials on the defice" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | FILES_${PN} += "${sysconfdir}/sota.toml" | ||
6 | |||
7 | ALLOW_EMPTY_${PN} = "1" | ||
8 | |||
9 | export SOTA_CREDENTIALS | ||
10 | |||
11 | do_install() { | ||
12 | if [ -n "$SOTA_CREDENTIALS" ]; then | ||
13 | if [ -f "$SOTA_CREDENTIALS" ]; then | ||
14 | EXT=`basename $SOTA_CREDENTIALS | cut -d'.' -f2` | ||
15 | if [ "$EXT" != "toml" ]; then | ||
16 | bbwarn "File\'s extension is not \'toml\', make sure you have the correct file" | ||
17 | fi | ||
18 | |||
19 | install -d ${D}${sysconfdir} | ||
20 | cat $SOTA_CREDENTIALS | sed 's/^package_manager = .*$/package_manager = "ostree"/' > ${D}${sysconfdir}/sota.toml | ||
21 | chmod 644 ${D}${sysconfdir}/sota.toml | ||
22 | else | ||
23 | bberror "File $SOTA_CREDENTIALS does not exist" | ||
24 | fi | ||
25 | fi | ||
26 | } | ||
27 | |||