diff options
Diffstat (limited to 'recipes-test/demo-network-config/network-config.inc')
-rw-r--r-- | recipes-test/demo-network-config/network-config.inc | 9 |
1 files changed, 6 insertions, 3 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 | ||