All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <harvey.tim@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH v2] nuttcp: new recipe
Date: Tue, 16 Nov 2010 10:01:25 -0800	[thread overview]
Message-ID: <1289930485-7905-1-git-send-email-harvey.tim@gmail.com> (raw)

Signed-off-by: Tim Harvey <harvey.tim@gmail.com>
---
 recipes/nuttcp/nuttcp/nuttcpd.init |   33 +++++++++++++++++++++++++++++++++
 recipes/nuttcp/nuttcp_7.1.3.bb     |   26 ++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100644 recipes/nuttcp/nuttcp/nuttcpd.init
 create mode 100644 recipes/nuttcp/nuttcp_7.1.3.bb

diff --git a/recipes/nuttcp/nuttcp/nuttcpd.init b/recipes/nuttcp/nuttcp/nuttcpd.init
new file mode 100644
index 0000000..7a46622
--- /dev/null
+++ b/recipes/nuttcp/nuttcp/nuttcpd.init
@@ -0,0 +1,33 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/nuttcpd and type
+# > update-rc.d nuttcpd defaults 60
+#
+
+
+test -f /usr/sbin/nuttcp || exit 0
+
+case "$1" in
+  start)
+    echo -n "Starting nuttcp background daemon"
+    nuttcp -S
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping nuttcp background daemon"
+    killall nuttcp
+    echo "."
+    ;;
+  restart)
+    stop
+    sleep 1
+    start
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/nuttcpd {start|stop|restart}"
+    exit 1
+esac
+
+exit 0
diff --git a/recipes/nuttcp/nuttcp_7.1.3.bb b/recipes/nuttcp/nuttcp_7.1.3.bb
new file mode 100644
index 0000000..a3bcd31
--- /dev/null
+++ b/recipes/nuttcp/nuttcp_7.1.3.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "TCP/UDP network testing tool, much like iperf"
+HOMEPAGE = "http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+
+SRC_URI = "http://www.wcisd.hpc.mil/nuttcp/nuttcp-${PV}.c \
+        file://nuttcpd.init"
+SRC_URI[md5sum] = "e5f360f8a4cb8f85754ca8708612c4a3"
+SRC_URI[sha256sum] = "b8915040e576abe8678713fba01125dd246821f4b426e095e5c9bb2c559a2384"
+
+S = "${WORKDIR}"
+
+inherit update-rc.d
+
+do_compile() {
+        ${CC} ${LDFLAGS} nuttcp-${PV}.c -o nuttcp
+}
+do_install() {
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${WORKDIR}/nuttcpd.init ${D}${sysconfdir}/init.d/nuttcp
+        install -d ${D}${sbindir}
+        install -m 0755 nuttcp ${D}${sbindir}
+}
+
+INITSCRIPT_NAME = "nuttcp"
+INITSCRIPT_PARAMS = "defaults 60"
-- 
1.7.0.4




                 reply	other threads:[~2010-11-16 18:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289930485-7905-1-git-send-email-harvey.tim@gmail.com \
    --to=harvey.tim@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.