blob: 006f976997e709011fa3744425080126b2ffed57 [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 Williams213cb262021-08-07 19:21:33 -05009SRC_URI:append:qemuall = " file://wired.config \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010 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 Williams213cb262021-08-07 19:21:33 -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
Patrick Williams213cb262021-08-07 19:21:33 -050036SYSTEMD_SERVICE:${PN}:qemuall = "wired-connection.service"