blob: 3b78a405f23f110d6a04fe8d81a8dbf346eda3ab [file] [log] [blame]
Willy Tu1fe95d52021-02-09 12:41:44 -08001PR = "r1"
2
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6inherit systemd
7
Willy Tu4dd03ca2021-08-06 09:37:35 -07008RDEPENDS:${PN} += "iperf3"
Willy Tu1fe95d52021-02-09 12:41:44 -08009
10SRC_URI += "file://iperf3.service"
11
Willy Tu4dd03ca2021-08-06 09:37:35 -070012SYSTEMD_SERVICE:${PN} += "iperf3.service"
Willy Tu1fe95d52021-02-09 12:41:44 -080013
14do_install() {
William A. Kennington III726cef82021-03-08 14:31:28 -080015 # Install service definitions
16 install -d -m 0755 ${D}${systemd_system_unitdir}
17 install -m 0644 ${WORKDIR}/iperf3.service ${D}${systemd_system_unitdir}
18}
19
William A. Kennington III832f02b2021-04-23 12:53:36 -070020# Allow IPERF3 to run on the gbmcbr node on DEV builds
Willy Tu4dd03ca2021-08-06 09:37:35 -070021do_install:append:dev() {
William A. Kennington III726cef82021-03-08 14:31:28 -080022 nftables_dir=${D}${sysconfdir}/nftables
23 rules=$nftables_dir/50-gbmc-iperf3-dev.rules
24 install -d -m0755 $nftables_dir
25 echo 'table inet filter {' >"$rules"
William A. Kennington III832f02b2021-04-23 12:53:36 -070026 echo ' chain gbmc_br_pub_input {' >>"$rules"
William A. Kennington III726cef82021-03-08 14:31:28 -080027 echo ' tcp dport 5201 accept' >>"$rules"
28 echo ' }' >>"$rules"
29 echo '}' >>"$rules"
Willy Tu1fe95d52021-02-09 12:41:44 -080030}