summaryrefslogtreecommitdiff
path: root/scripts/local-top/md
blob: 48c3ce6fb94f69f2f6b1dd4e47d96cc403a3108f (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
#!/bin/sh

PREREQ=""

prereqs()
{
	echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

unset raidlvl

# Detect raid level
for x in /dev/hd* /dev/sd*; do
	raidlvl=$(mdadm --examine ${x} | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/')
	modprobe -q ${raidlvl}
done

[ x${raidlvl} != x ] || return

/sbin/mdrun /dev