summaryrefslogtreecommitdiffstats
path: root/debian/dpdk.init
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:29:06 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:37:12 +0200
commit199e427d5dea3051eec1726eb9c857aa3d5fdde2 (patch)
tree5477b3bd4868676a210bbd3ef67a469d34814e61 /debian/dpdk.init
parentb5cdd645c9fc62341d55aebbfc93a1b648415512 (diff)
Merge Ubuntu DPDK packaging as of 15th June 2016
As discussed this shall be our initial baseline. If history is needed for any sort of debugging or analysis it can be found at https://code.launchpad.net/~ubuntu-server/dpdk/+git/dpdk Change-Id: Ie95c7effbbea34d723df14f6451c1f782000cbc1 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/dpdk.init')
-rw-r--r--debian/dpdk.init57
1 files changed, 57 insertions, 0 deletions
diff --git a/debian/dpdk.init b/debian/dpdk.init
new file mode 100644
index 00000000..01b47845
--- /dev/null
+++ b/debian/dpdk.init
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: dpdk
+# Required-Start: $remote_fs $local_fs
+# Required-Stop: $remote_fs $local_fs
+# Default-Start: S
+# Default-Stop: 0 1 6
+# Short-Description: start dpdk runtime environment
+### END INIT INFO
+
+set -e
+
+PATH="/sbin:/bin:/usr/bin"
+
+[ -d /lib/dpdk ] || exit 0
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+error=0
+case "$1" in
+start)
+ log_action_begin_msg "Starting DPDK environment" "dpdk"
+ output=$(/lib/dpdk/dpdk-init start 2>&1) || error="$?"
+ if [ ! -z "$output" ]; then
+ echo "$output" | while read line; do
+ log_action_cont_msg "$line"
+ done
+ fi
+ log_action_end_msg $error
+ exit $error
+ ;;
+stop)
+ ;;
+restart|force-reload)
+ ;;
+status)
+ output=$(/lib/dpdk/dpdk-init --status 2>&1) || error="$?"
+ if [ ! -z "$output" ]; then
+ echo "$output" | while read line; do
+ log_action_cont_msg "$line"
+ done
+ fi
+ log_action_end_msg $error
+ exit $error
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart|force-reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
+