File: mdutils.sh

package info (click to toggle)
mdutils 0.35-27
  • links: PTS
  • area: main
  • in suites: potato
  • size: 156 kB
  • ctags: 74
  • sloc: ansic: 593; makefile: 114; sh: 51
file content (41 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (3)
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
#! /bin/sh
#
# md		Enable or disable multiple devices. If /etc/mdtab doesn't
#		exist or is empty we don't bother; likewise if mdadd or
#		mdstop isn't installed.
#
#		Note that since this is called early in the bootprocess you
#		can't swap to an MD device; but you don't want to do that
#		anyway as the Linux kernel can stripe swap partitions
#		itself (see swapon manpage).
#
# Version:	@(#)md  2.73  08-Jan-1998  miquels@cistron.nl
#

case "$1" in
	start|"")
		if [ -s /etc/mdtab -a -f /sbin/mdadd ]
		then
			[ "$VERBOSE" != no ] && echo "Adding md devices."
			mdadd -ar
		fi
		: ;;
	stop)
		if [ -r /etc/mdtab -a -x /sbin/mdstop ]
		then
			[ "$VERBOSE" != no ] && echo "Stopping md devices."
        		mdstop -a
		fi
		: ;;
	reload)
		echo "Reload not possible, use restart."
		;;
	restart|force-reload)
		/etc/init.d/mdutils stop
		/etc/init.d/mdutils start
		;;
	*)
		echo "Usage: mdutils [start] [stop]" >&2
		false
		;;
esac