Update librte-pmd-bond1.symbols with new symbol.
[deb_dpdk.git] / debian / dpdk.init
1 #!/bin/sh
2
3 ### BEGIN INIT INFO
4 # Provides:          dpdk
5 # Required-Start:    $remote_fs $local_fs
6 # Required-Stop:     $remote_fs $local_fs
7 # Default-Start:     S
8 # Default-Stop:      0 1 6
9 # Short-Description: start dpdk runtime environment
10 ### END INIT INFO
11
12 set -e
13
14 PATH="/sbin:/bin:/usr/bin"
15
16 [ -d /lib/dpdk ] || exit 0
17
18 # Define LSB log_* functions.
19 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
20 # and status_of_proc is working.
21 . /lib/lsb/init-functions
22
23 error=0
24 case "$1" in
25 start)
26     log_action_begin_msg "Starting DPDK environment" "dpdk"
27     output=$(/lib/dpdk/dpdk-init start 2>&1) || error="$?"
28     if [ ! -z "$output" ]; then
29         echo "$output" | while read line; do
30             log_action_cont_msg "$line"
31         done
32     fi
33     log_action_end_msg $error
34     exit $error
35     ;;
36 stop)
37     ;;
38 try-restart|restart|force-reload)
39     ;;
40 status)
41     output=$(/lib/dpdk/dpdk-init --status 2>&1) || error="$?"
42     if [ ! -z "$output" ]; then
43         echo "$output" | while read line; do
44             log_action_cont_msg "$line"
45         done
46     fi
47     log_action_end_msg $error
48     exit $error
49     ;;
50 *)
51     echo "Usage: $0 {start|stop|restart|force-reload|status}"
52     exit 1
53     ;;
54 esac
55
56 exit 0
57