File: drbdlinksclean.init

package info (click to toggle)
drbdlinks 1.07-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 112 kB
  • ctags: 53
  • sloc: python: 254; sh: 62; makefile: 41
file content (38 lines) | stat: -rwxr-xr-x 799 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
#!/bin/sh
#
#  drbdlinks: Cleans links made by drbdlinks.
#
#  chkconfig: 2345 74 06
#  description: Calls drbdlinks on initial system boot and shutdown to make
#               sure that any links set up by drbdlinks are cleaned up when
#               drbd is not running.
#

# Source function library.
. /lib/lsb/init-functions

if [ ! -f /etc/drbd.conf ]
then
   echo "No /etc/drbd.conf file.  Aborting."
   exit 1
fi

case "$1" in
	start)
		echo -n 'Cleaning up drbdlinks links...'
		/usr/sbin/drbdlinks stop
		[ "$?" -eq 0 ] && log_success_msg OK || log_failure_msg start-failure
		;;

	stop)
		echo -n 'Cleaning up drbdlinks links...'
		/usr/sbin/drbdlinks stop
		[ "$?" -eq 0 ] && log_success_msg OK || log_failure_msg stop-failure
		;;

	*)
		echo "usage: $0 {start|stop}"
		;;
esac

exit 0