Commit e47172d6 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/mdadm: do no exit with error if all raids are already

ref #275
parent 69d4c4d6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mdadm pkgname=mdadm
pkgver=3.1.1 pkgver=3.1.1
pkgrel=1 pkgrel=2
pkgdesc="a tool for managing Linux Software RAID arrays" pkgdesc="a tool for managing Linux Software RAID arrays"
url="http://neil.brown.name/blog/mdadm" url="http://neil.brown.name/blog/mdadm"
license="GPL-2" license="GPL-2"
...@@ -35,5 +35,5 @@ package() { ...@@ -35,5 +35,5 @@ package() {
md5sums="8bfeea282d21b5ef8e825122fb359457 mdadm-3.1.1.tar.gz md5sums="8bfeea282d21b5ef8e825122fb359457 mdadm-3.1.1.tar.gz
ce57e798431f7ab89f9b07a7daaa4852 mdadm.initd ce57e798431f7ab89f9b07a7daaa4852 mdadm.initd
16d2b8eb2e17184357db503470fdd8eb mdadm.confd 16d2b8eb2e17184357db503470fdd8eb mdadm.confd
974e3496d2e4b7c9c17c3279388f45ae mdadm-raid.initd af5bb6e1479bf1d27cf50521af82dae1 mdadm-raid.initd
aa601f072096fb8bae8b8946f59a561f mdadm-uclibc.patch" aa601f072096fb8bae8b8946f59a561f mdadm-uclibc.patch"
...@@ -11,11 +11,13 @@ start() { ...@@ -11,11 +11,13 @@ start() {
# start all devices that are not already started # start all devices that are not already started
[ -f /proc/mdstat ] || modprobe -k md > /dev/null 2>&1 [ -f /proc/mdstat ] || modprobe -k md > /dev/null 2>&1
local tostart= local tostart=
ebegin "Starting RAID devices"
for i in $(awk '{print $2}' /etc/mdadm.conf); do for i in $(awk '{print $2}' /etc/mdadm.conf); do
[ -b "$i" ] && continue [ -b "$i" ] && continue
tostart="$tostart $i" tostart="$tostart $i"
done done
[ -z "$tostart" ] && return 0
ebegin "Starting RAID devices"
mdadm --assemble --scan --quiet $tostart mdadm --assemble --scan --quiet $tostart
eend $? eend $?
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment