summaryrefslogtreecommitdiffstats
path: root/recipes-test/demo-network-config
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-10-30 15:56:19 +0100
committerGitHub <noreply@github.com>2019-10-30 15:56:19 +0100
commit8d340b0cc95bf98e844bd550bd779ae4fe772d9f (patch)
tree4ee9a28ec98c4b1230d7bfd41ae8f8e7b5c8df67 /recipes-test/demo-network-config
parent4d2ff5c6c3e6edf286bacfe92cd5c63685865621 (diff)
parent1e0015a2592bd9e4dee5de041b0fc4962de033df (diff)
downloadmeta-updater-8d340b0cc95bf98e844bd550bd779ae4fe772d9f.tar.gz
Merge pull request #617 from advancedtelematic/feat/warrior/2019.9-backport
Feat/warrior/2019.9 backport
Diffstat (limited to 'recipes-test/demo-network-config')
-rw-r--r--recipes-test/demo-network-config/network-config.inc9
-rw-r--r--recipes-test/demo-network-config/primary-network-config.bb8
-rw-r--r--recipes-test/demo-network-config/secondary-network-config.bb8
3 files changed, 12 insertions, 13 deletions
diff --git a/recipes-test/demo-network-config/network-config.inc b/recipes-test/demo-network-config/network-config.inc
index ed623d4..b023f51 100644
--- a/recipes-test/demo-network-config/network-config.inc
+++ b/recipes-test/demo-network-config/network-config.inc
@@ -2,15 +2,18 @@ SRC_URI_append = "\
2 file://26-${CONF_TYPE}-client.network \ 2 file://26-${CONF_TYPE}-client.network \
3 " 3 "
4 4
5# Because of the dependency on MACHINE.
6PACKAGE_ARCH = "${MACHINE_ARCH}"
7
5SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" 8SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}"
6 9
7do_install_append() { 10do_install_append() {
8 bbnote "Network configuration type to be applied: ${CONF_TYPE}" 11 bbnote "Network configuration type to be applied: ${CONF_TYPE}"
9 install -d ${D}/usr/lib/systemd/network 12 install -d ${D}${libdir}/systemd/network
10 install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}/usr/lib/systemd/network/ 13 install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}${libdir}/systemd/network/
11 sed -i -e 's|@ADDR@|${IP_ADDR}|g' \ 14 sed -i -e 's|@ADDR@|${IP_ADDR}|g' \
12 -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \ 15 -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \
13 ${D}/usr/lib/systemd/network/26-${CONF_TYPE}-client.network 16 ${D}${libdir}/systemd/network/26-${CONF_TYPE}-client.network
14 17
15} 18}
16 19
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb
index d840a95..544a5ec 100644
--- a/recipes-test/demo-network-config/primary-network-config.bb
+++ b/recipes-test/demo-network-config/primary-network-config.bb
@@ -2,19 +2,17 @@ DESCRIPTION = "Sample network configuration for an Uptane Primary"
2LICENSE = "MPL-2.0" 2LICENSE = "MPL-2.0"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" 3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
4 4
5inherit allarch
6
7SRC_URI = "\ 5SRC_URI = "\
8 file://27-dhcp-client-external.network \ 6 file://27-dhcp-client-external.network \
9 " 7 "
10 8
11FILES_${PN} = "/usr/lib/systemd/network" 9FILES_${PN} = "${libdir}/systemd/network"
12 10
13PR = "1" 11PR = "1"
14 12
15do_install() { 13do_install() {
16 install -d ${D}/usr/lib/systemd/network 14 install -d ${D}${libdir}/systemd/network
17 install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}/usr/lib/systemd/network/ 15 install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/
18} 16}
19 17
20PRIMARY_IP ?= "10.0.3.1" 18PRIMARY_IP ?= "10.0.3.1"
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb
index b1d70f1..ca83d53 100644
--- a/recipes-test/demo-network-config/secondary-network-config.bb
+++ b/recipes-test/demo-network-config/secondary-network-config.bb
@@ -2,8 +2,6 @@ DESCRIPTION = "Sample network configuration for an Uptane Secondary"
2LICENSE = "MPL-2.0" 2LICENSE = "MPL-2.0"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" 3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
4 4
5inherit allarch
6
7# TODO: It configures the 'user' interface in NAT mode and provides an access to public Inet via it 5# TODO: It configures the 'user' interface in NAT mode and provides an access to public Inet via it
8# which is not desired for Secondary. It cannot be just removed since we get SSH access to Secondary 6# which is not desired for Secondary. It cannot be just removed since we get SSH access to Secondary
9# VM via this interface. So, the task is to configure the interface in such way that it does provide access 7# VM via this interface. So, the task is to configure the interface in such way that it does provide access
@@ -12,13 +10,13 @@ SRC_URI = "\
12 file://27-dhcp-client-external.network \ 10 file://27-dhcp-client-external.network \
13 " 11 "
14 12
15FILES_${PN} = "/usr/lib/systemd/network" 13FILES_${PN} = "${libdir}/systemd/network"
16 14
17PR = "1" 15PR = "1"
18 16
19do_install() { 17do_install() {
20 install -d ${D}/usr/lib/systemd/network 18 install -d ${D}${libdir}/systemd/network
21 install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}/usr/lib/systemd/network/ 19 install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/
22} 20}
23 21
24SECONDARY_IP ?= "10.0.3.2" 22SECONDARY_IP ?= "10.0.3.2"