File: evms.init

package info (click to toggle)
evms 1.0.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,168 kB
  • ctags: 5,853
  • sloc: ansic: 87,317; makefile: 691; sh: 238
file content (46 lines) | stat: -rw-r--r-- 1,150 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
#! /bin/sh
#
# evms          Enterprise Volume Management System
#
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#               Modified for evms package
#               by Matt Zimmerman <mdz@debian.org>
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=evms
DESC="Enterprise Volume Management System"

test -x /sbin/evms_rediscover || exit 0

set -e

# Only run if EVMS modules have been loaded.  If no modules are
# loaded, evms modules have been compiled in, in which case discovery
# has already been done by the kernel, or there is no evms support,
# and thus nothing for us to do.

if ! lsmod | egrep -q '^(ldev_mgr|dos_part|lvm_vge|evms.*|md_core|md_linear|md_raid0|md_raid1|AIXlvm_vge|os2lvm_vge|snapshot) '; then
  exit 0
fi

case "$1" in
  start|reload|restart|force-reload)
	echo -n "Starting $DESC: "
        evms_rediscover
        evms_devnode_fixup
	echo "$NAME."
	;;
  stop)
        # Nothing to do
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0