summaryrefslogtreecommitdiffstats
path: root/recipes-test/demo-network-config/network-config.inc
blob: a231a2425169d5b5a394d589011933850c9aec2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
SRC_URI_append = "\
    file://26-${CONF_TYPE}-client.network \
    "

SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}"

do_install_append() {
    bbnote "Network configuration type to be applied: ${CONF_TYPE}"
    install -d ${D}${libdir}/systemd/network
    install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}${libdir}/systemd/network/
    sed -i -e 's|@ADDR@|${IP_ADDR}|g' \
           -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \
           ${D}${libdir}/systemd/network/26-${CONF_TYPE}-client.network

}

# vim:set ts=4 sw=4 sts=4 expandtab: