File: multipath-tools.init

package info (click to toggle)
multipath-tools 0.4.8%2Bgit0.761c66f-10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,536 kB
  • ctags: 2,590
  • sloc: ansic: 22,254; sh: 549; makefile: 254
file content (57 lines) | stat: -rwxr-xr-x 1,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/sh
### BEGIN INIT INFO
# Provides:          multipath-tools
# Required-Start:    udev $local_fs $syslog
# Required-Stop:     udev $local_fs $syslog
# Should-Start:      iscsi
# Should-Stop:       iscsi
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: multipath daemon
# Description:
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/multipathd
NAME=multipathd
DESC="multipath daemon"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

if [ -f /etc/default/multipath-tools ] ; then
	. /etc/default/multipath-tools
fi

set -e

case "$1" in
  start)
	log_daemon_msg "Starting $DESC" "$NAME"
	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
	log_end_msg $?
	;;
  stop)
	log_daemon_msg "Stopping $DESC" "$NAME"
	start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
	log_end_msg $?
	;;
  reload|force-reload)
	log_daemon_msg "Reloading $DESC" "$NAME"
	start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
	log_end_msg $?
	;;
  restart|force-reload)
  	$0 stop
	sleep 1
	$0 start
	;;
  *)
	N=/etc/init.d/multipath-tools
	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0