Hi,

For my performance tests it would be convenient to start an iperf3
server as daemon automatically.  Can we add an rc script?

ok?

bluhm

Index: infrastructure/db/user.list
===================================================================
RCS file: /data/mirror/openbsd/cvs/ports/infrastructure/db/user.list,v
retrieving revision 1.357
diff -u -p -r1.357 user.list
--- infrastructure/db/user.list 29 Nov 2019 02:42:44 -0000      1.357
+++ infrastructure/db/user.list 22 Jan 2020 20:31:48 -0000
@@ -354,3 +354,4 @@ id  user            group           port
 844 _routinator                _routinator     net/routinator
 845 _snmpexporter      _snmpexporter   sysutils/snmp_exporter
 846 _dhcpcd            _dhcpcd         net/dhcpcd
+847 _iperf3            _iperf3         net/iperf3
Index: net/iperf3/Makefile
===================================================================
RCS file: /data/mirror/openbsd/cvs/ports/net/iperf3/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- net/iperf3/Makefile 28 Jun 2019 07:25:37 -0000      1.4
+++ net/iperf3/Makefile 22 Jan 2020 12:03:57 -0000
@@ -3,6 +3,7 @@
 COMMENT=       tool to measure maximum achievable bandwidth on IP networks

 V=             3.7
+REVISION=      0
 PKGNAME=       iperf3-${V}
 DISTNAME=      iperf-${V}

Index: net/iperf3/pkg/PLIST
===================================================================
RCS file: /data/mirror/openbsd/cvs/ports/net/iperf3/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- net/iperf3/pkg/PLIST        21 Sep 2016 01:12:57 -0000      1.1.1.1
+++ net/iperf3/pkg/PLIST        22 Jan 2020 20:32:36 -0000
@@ -1,7 +1,10 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2016/09/21 01:12:57 lteo Exp $
+@newgroup _iperf3:847
+@newuser _iperf3:847:_iperf3:daemon:iperf3 server:/nonexistent:/sbin/nologin
+@rcscript ${RCDIR}/iperf3
 @bin bin/iperf3
 include/iperf_api.h
-lib/libiperf.a
+@static-lib lib/libiperf.a
 lib/libiperf.la
 @lib lib/libiperf.so.${LIBiperf_VERSION}
 @man man/man1/iperf3.1
Index: net/iperf3/pkg/iperf3.rc
===================================================================
RCS file: net/iperf3/pkg/iperf3.rc
diff -N net/iperf3/pkg/iperf3.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ net/iperf3/pkg/iperf3.rc    22 Jan 2020 20:18:43 -0000
@@ -0,0 +1,12 @@
+#!/bin/ksh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/bin/iperf3"
+daemon_flags="-s -D"
+daemon_user="_iperf3"
+rc_reload=NO
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply via email to