DESCRIPTION = "Default eth0 and wlan0 network service"
|
LICENSE = "GPL-2.0-only"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
|
|
inherit systemd
|
|
SYSTEMD_AUTO_ENABLE = "enable"
|
SYSTEMD_SERVICE:${PN} = "wpa-conf.service"
|
|
WLAN_DEV ?= "wlan0"
|
|
SRC_URI += " file://10-eth0.network "
|
SRC_URI += " file://20-wlan0.network "
|
SRC_URI += " file://wpa-conf.service "
|
|
FILES:${PN} += "${sysconfdir}/systemd/network/10-eth0.network"
|
FILES:${PN} += "${sysconfdir}/systemd/network/20-wlan0.network"
|
FILES:${PN} += "${systemd_unitdir}/system/wpa-conf.service"
|
|
do_install() {
|
install -d ${D}/${systemd_unitdir}/system
|
install -d ${D}${sysconfdir}/systemd/network
|
|
install -m 0644 ${WORKDIR}/10-eth0.network ${D}${sysconfdir}/systemd/network
|
|
install -m 0644 ${WORKDIR}/20-wlan0.network ${D}${sysconfdir}/systemd/network
|
sed -i "s|wlan0|${WLAN_DEV}|g" ${D}${sysconfdir}/systemd/network/20-wlan0.network
|
|
install -m 0644 ${WORKDIR}/wpa-conf.service ${D}/${systemd_unitdir}/system
|
sed -i "s|wlan0|${WLAN_DEV}|g" ${D}/${systemd_unitdir}/system/wpa-conf.service
|
}
|