Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Connman config to setup wired interface on qemu machines" |
| 2 | DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ |
| 3 | network interface for a qemu machine." |
| 4 | LICENSE = "GPLv2" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 7 | inherit systemd |
| 8 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | SRC_URI:append:qemuall = " file://wired.config \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | file://wired-setup \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 11 | file://wired-connection.service \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | " |
| 13 | PR = "r2" |
| 14 | |
| 15 | S = "${WORKDIR}" |
| 16 | |
| 17 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 18 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | FILES:${PN} = "${localstatedir}/* ${datadir}/*" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
| 21 | do_install() { |
| 22 | #Configure Wired network interface in case of qemu* machines |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | if test -e ${WORKDIR}/wired.config && |
| 24 | test -e ${WORKDIR}/wired-setup && |
| 25 | test -e ${WORKDIR}/wired-connection.service; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | install -d ${D}${localstatedir}/lib/connman |
| 27 | install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 28 | install -d ${D}${datadir}/connman |
| 29 | install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 30 | 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | fi |
| 34 | } |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 35 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | SYSTEMD_SERVICE:${PN}:qemuall = "wired-connection.service" |