aboutsummaryrefslogtreecommitdiffstats
path: root/main/mdadm/mdadm-raid.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-16 14:33:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-16 14:35:56 +0000
commite47172d6a82ba03449f131e8329f349f254662bb (patch)
treeaf9cf3d66e4fd9ec406d3754936e84816eaaab47 /main/mdadm/mdadm-raid.initd
parent69d4c4d6ef9554ab8dfe8eea1358deb9ebba5640 (diff)
downloadaports-e47172d6a82ba03449f131e8329f349f254662bb.tar.bz2
aports-e47172d6a82ba03449f131e8329f349f254662bb.tar.xz
main/mdadm: do no exit with error if all raids are already
ref #275
Diffstat (limited to 'main/mdadm/mdadm-raid.initd')
-rw-r--r--main/mdadm/mdadm-raid.initd6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/mdadm/mdadm-raid.initd b/main/mdadm/mdadm-raid.initd
index d2479737cd..73efbe8efd 100644
--- a/main/mdadm/mdadm-raid.initd
+++ b/main/mdadm/mdadm-raid.initd
@@ -11,11 +11,13 @@ start() {
# start all devices that are not already started
[ -f /proc/mdstat ] || modprobe -k md > /dev/null 2>&1
local tostart=
- ebegin "Starting RAID devices"
for i in $(awk '{print $2}' /etc/mdadm.conf); do
[ -b "$i" ] && continue
tostart="$tostart $i"
- done
+ done
+ [ -z "$tostart" ] && return 0
+
+ ebegin "Starting RAID devices"
mdadm --assemble --scan --quiet $tostart
eend $?
}