aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorOleksandr Kravchuk <open.source@oleksandr-kravchuk.com>2019-06-24 00:35:54 +0200
committerKhem Raj <raj.khem@gmail.com>2019-06-25 14:21:48 -0700
commit2a3177255ba2f182e439722c161078107bc98a6d (patch)
tree4ec21ad172c1cbd154fcd065e68d37d87a6a6e33 /meta-networking
parenta38651166e478126e5192f8eb3a6783c477cf71f (diff)
downloadmeta-openembedded-contrib-2a3177255ba2f182e439722c161078107bc98a6d.tar.gz
nuttcp: add systemd unit file
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket9
-rw-r--r--meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service8
-rw-r--r--meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb12
3 files changed, 28 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket b/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket
new file mode 100644
index 0000000000..a8ae74fb88
--- /dev/null
+++ b/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Network Performance Testing Server Activation Socket
+
+[Socket]
+ListenStream=5000
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service b/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service
new file mode 100644
index 0000000000..b778e8552b
--- /dev/null
+++ b/meta-networking/recipes-support/nuttcp/nuttcp/nuttcp@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Network Performance Testing Server
+After=local-fs.target
+
+[Service]
+User=nobody
+ExecStart=/usr/bin/nuttcp -S
+StandardInput=socket
diff --git a/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb b/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb
index 2fd5631233..193caf3cf3 100644
--- a/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb
+++ b/meta-networking/recipes-support/nuttcp/nuttcp_8.2.2.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://${BP}.c;beginline=4;endline=30;md5=496a7c0bb83c07ff52
UPSTREAM_CHECK_URI = "https://www.nuttcp.net/nuttcp/beta/"
-SRC_URI = "http://nuttcp.net/${BPN}/beta/${BP}.c"
+SRC_URI = "http://nuttcp.net/${BPN}/beta/${BP}.c \
+ file://nuttcp@.service \
+ file://nuttcp.socket"
SRC_URI[md5sum] = "d3c92c4d2f261221193c3726c1b9a42f"
SRC_URI[sha256sum] = "8c5595bcd27c2fd66831be74c390df078cfb1870aa427f2511ac2586d236c8a1"
@@ -24,5 +26,13 @@ do_compile () {
do_install () {
install -d ${D}${bindir}
+ install -d ${D}${systemd_system_unitdir}
install -m 0755 nuttcp ${D}${bindir}
+ install -m 0644 ${WORKDIR}/nuttcp@.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/nuttcp.socket ${D}${systemd_system_unitdir}
}
+
+FILES_${PN} += " \
+ ${bindir} \
+ ${systemd_system_unitdir} \
+"