File: init.d_evms

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 (64 lines) | stat: -rw-r--r-- 1,880 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
58
59
60
61
62
63
64
#! /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>
#
#
#		This is an example SysV Init script to run an EVMS volume
#		rediscovery at boot time after the EVMS kernel modules have
#		been loaded. This script is only necessary if you have
#		compiled the EVMS kernel code as modules (not statically
#		into the kernel), and are not already running evms_rediscover
#		from an init-ramdisk script.
#
#		This script was written to work on Debian systems, but could
#		easily be modified to work on other distributions as well.
#		This script should be installed to /etc/init.d, or the
#		equivalent directory for your distro. Then use your favorite
#		SysV runlevel admin tool to add this script to the boot
#		process for your system.


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

test -x /usr/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 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
        if ! test -e /dev/.devfsd; then
            evms_devnode_fixup
        fi
	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