diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-10-30 15:56:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 15:56:19 +0100 |
commit | 8d340b0cc95bf98e844bd550bd779ae4fe772d9f (patch) | |
tree | 4ee9a28ec98c4b1230d7bfd41ae8f8e7b5c8df67 /recipes-test/demo-network-config | |
parent | 4d2ff5c6c3e6edf286bacfe92cd5c63685865621 (diff) | |
parent | 1e0015a2592bd9e4dee5de041b0fc4962de033df (diff) | |
download | meta-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')
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. | ||
6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
7 | |||
5 | SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" | 8 | SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" |
6 | 9 | ||
7 | do_install_append() { | 10 | do_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" | |||
2 | LICENSE = "MPL-2.0" | 2 | LICENSE = "MPL-2.0" |
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" |
4 | 4 | ||
5 | inherit allarch | ||
6 | |||
7 | SRC_URI = "\ | 5 | SRC_URI = "\ |
8 | file://27-dhcp-client-external.network \ | 6 | file://27-dhcp-client-external.network \ |
9 | " | 7 | " |
10 | 8 | ||
11 | FILES_${PN} = "/usr/lib/systemd/network" | 9 | FILES_${PN} = "${libdir}/systemd/network" |
12 | 10 | ||
13 | PR = "1" | 11 | PR = "1" |
14 | 12 | ||
15 | do_install() { | 13 | do_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 | ||
20 | PRIMARY_IP ?= "10.0.3.1" | 18 | PRIMARY_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" | |||
2 | LICENSE = "MPL-2.0" | 2 | LICENSE = "MPL-2.0" |
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" |
4 | 4 | ||
5 | inherit 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 | ||
15 | FILES_${PN} = "/usr/lib/systemd/network" | 13 | FILES_${PN} = "${libdir}/systemd/network" |
16 | 14 | ||
17 | PR = "1" | 15 | PR = "1" |
18 | 16 | ||
19 | do_install() { | 17 | do_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 | ||
24 | SECONDARY_IP ?= "10.0.3.2" | 22 | SECONDARY_IP ?= "10.0.3.2" |