summaryrefslogtreecommitdiff
blob: 398c0004e440f365afb73580d0e556ee17bb9d18 (plain)
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
65
66
67
68
69
70
71
72
73
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo/src/livecd/profiles/rtcw-et/Attic/md,v 1.1 2003/10/19 03:46:50 livewire Exp $

HILITE="\033[1m"
NORMAL="\033[0m"

RAID="yes"
CMDLINE="`cat /proc/cmdline`"
for x in $CMDLINE
do
        if [ "$x" = "noraid" ]
        then
                RAID="no"
        fi
done

depend() {
	after checkfs
	after *
}

blurb() {
	echo -ne ${HILITE}${1}
	#blurblen=${#1}
}

backup() {
	echo -ne "\033[0G\033[0K"
}
start() {
        ebegin "Raid Setup"

if [ "$RAID" = "yes" ]
        then
                ebegin "Auto-detecting EVMS modules"
                # Disable kernel messages to console:
                echo "0" > /proc/sys/kernel/printk
                local x
                for x in /lib/modules/*/kernel/drivers/evms/*
                do
                        y=${x##*/}
                        y=${y%%.*}
                        echo -ne " ${GOOD}*${NORMAL} Scanning for ${y}..."
                        insmod -f ${x} > /dev/null 2>&1
                        backup
                done
        fi

if [ "$RAID" = "yes" ]
        then
                ebegin "Auto-detecting MD modules"
                # Disable kernel messages to console:
                echo "0" > /proc/sys/kernel/printk
                local x
                for x in /lib/modules/*/kernel/drivers/md/*
                do
                        y=${x##*/}
                        y=${y%%.*}
                        echo -ne " ${GOOD}*${NORMAL} Scanning for ${y}..."
                        insmod -f ${x} > /dev/null 2>&1
                        backup
                done
        fi

}

stop() {
	return
}

# vim:ts=4