blob: 85fee09258deb58fbe28f9753865e99096a894d2 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Connman config to setup wired interface on qemu machines"
2DESCRIPTION = "This is the ConnMan configuration to set up a Wired \
3network interface for a qemu machine."
4LICENSE = "GPLv2"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06005LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007inherit systemd
8
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009SRC_URI_append_qemuall = " file://wired.config \
10 file://wired-setup \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011 file://wired-connection.service \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012"
13PR = "r2"
14
15S = "${WORKDIR}"
16
17PACKAGE_ARCH = "${MACHINE_ARCH}"
18
Patrick Williamsf1e5d692016-03-30 15:21:19 -050019FILES_${PN} = "${localstatedir}/* ${datadir}/*"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21do_install() {
22 #Configure Wired network interface in case of qemu* machines
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023 if test -e ${WORKDIR}/wired.config &&
24 test -e ${WORKDIR}/wired-setup &&
25 test -e ${WORKDIR}/wired-connection.service; then
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 install -d ${D}${localstatedir}/lib/connman
27 install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
Patrick Williamsf1e5d692016-03-30 15:21:19 -050028 install -d ${D}${datadir}/connman
29 install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030 install -d ${D}${systemd_system_unitdir}
31 install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir}
32 sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033 fi
34}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050035
36SYSTEMD_SERVICE_${PN}_qemuall = "wired-connection.service"