aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeblu <seblu@seblu.net>2011-02-24 04:18:10 +0100
committerThomas Bächler <thomas@archlinux.org>2011-02-27 11:52:59 +0100
commit8b2bfa7bd0073a3a9d389242faf16483c9ec5336 (patch)
treec6d5f050562c7d8a520e24b478375ac0fa69f60c
parentd1e9a3deff2d432bb8f39cd94bf27182cb67948c (diff)
downloadinitscripts-8b2bfa7bd0073a3a9d389242faf16483c9ec5336.tar.xz
Software RAID detection is now triggered via USEMDADM config var like fakeraid and lvm
-rw-r--r--rc.conf3
-rwxr-xr-xrc.sysinit6
2 files changed, 6 insertions, 3 deletions
diff --git a/rc.conf b/rc.conf
index cb8f69d..e14fb23 100644
--- a/rc.conf
+++ b/rc.conf
@@ -36,6 +36,9 @@ USECOLOR="yes"
MOD_AUTOLOAD="yes"
MODULES=()
+# Scan for SoftRAID (mdadm) Volumes at startup
+USEMDADM="no"
+
# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"
diff --git a/rc.sysinit b/rc.sysinit
index 5e5ed2b..5d94de8 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -112,9 +112,9 @@ run_hook sysinit_udevsettled
[[ -d /sys/class/net/lo ]] && \
status "Bringing up loopback interface" /sbin/ifconfig lo 127.0.0.1 up
-# If necessary, find md devices and manually assemble RAID arrays
-if [[ -f /etc/mdadm.conf ]] && /bin/grep -q ^ARRAY /etc/mdadm.conf; then
- status "Activating RAID arrays" /sbin/mdadm --assemble --scan
+# SoftRAID devices detection
+if [[ $USEMDADM =~ yes|YES && -x /sbin/mdadm ]]; then
+ status "Activating SoftRAID arrays" /sbin/mdadm --assemble --scan
fi
# FakeRAID devices detection