diff options
Diffstat (limited to 'meta-networking/recipes-support/netperf/files/init')
| -rw-r--r-- | meta-networking/recipes-support/netperf/files/init | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/netperf/files/init b/meta-networking/recipes-support/netperf/files/init new file mode 100644 index 0000000000..8ba2a63731 --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/init | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # | ||
| 4 | # Written by Miquel van Smoorenburg <miquels@cistron.nl>. | ||
| 5 | # Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>. | ||
| 6 | # Modified for Debian by Christoph Lameter <clameter@debian.org> | ||
| 7 | # Modified for openembedded by Bruno Randolf <bruno.randolf@4g-systems.biz> | ||
| 8 | |||
| 9 | ### BEGIN INIT INFO | ||
| 10 | # Provides: netperf | ||
| 11 | # Required-Start: $remote_fs $local_fs $time | ||
| 12 | # Required-Stop: $remote_fs $local_fs $time | ||
| 13 | # Should-Start: $network $named | ||
| 14 | # Should-Stop: $network $named | ||
| 15 | # Default-Start: 2 3 4 5 | ||
| 16 | # Default-Stop: 0 1 6 | ||
| 17 | # Short-Description: network benchmark | ||
| 18 | ### END INIT INFO | ||
| 19 | |||
| 20 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
| 21 | DAEMON=/usr/sbin/netserver | ||
| 22 | |||
| 23 | test -f $DAEMON || exit 0 | ||
| 24 | |||
| 25 | case "$1" in | ||
| 26 | start) | ||
| 27 | echo -n "Starting network benchmark server: netserver" | ||
| 28 | start-stop-daemon -S -x $DAEMON > /dev/null 2>&1 | ||
| 29 | echo "." | ||
| 30 | ;; | ||
| 31 | stop) | ||
| 32 | echo -n "Stopping network benchmark server: netserver" | ||
| 33 | start-stop-daemon -K -x $DAEMON | ||
| 34 | echo "." | ||
| 35 | ;; | ||
| 36 | #reload) | ||
| 37 | # | ||
| 38 | # If the daemon can reload its config files on the fly | ||
| 39 | # for example by sending it SIGHUP, do it here. | ||
| 40 | # | ||
| 41 | # If the daemon responds to changes in its config file | ||
| 42 | # directly anyway, make this a do-nothing entry. | ||
| 43 | # | ||
| 44 | # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON | ||
| 45 | # ;; | ||
| 46 | restart|force-reload) | ||
| 47 | # | ||
| 48 | # If the "reload" option is implemented, move the "force-reload" | ||
| 49 | # option to the "reload" entry above. If not, "force-reload" is | ||
| 50 | # just the same as "restart". | ||
| 51 | # | ||
| 52 | start-stop-daemon -K -x $DAEMON | ||
| 53 | sleep 1 | ||
| 54 | start-stop-daemon -S -x $DAEMON | ||
| 55 | ;; | ||
| 56 | *) | ||
| 57 | echo "Usage: /etc/init.d/netperf {start|stop|restart|force-reload}" | ||
| 58 | exit 1 | ||
| 59 | ;; | ||
| 60 | esac | ||
| 61 | |||
| 62 | exit 0 | ||
