aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/mdadm/APKBUILD4
-rw-r--r--main/mdadm/mdadm-raid.initd8
2 files changed, 8 insertions, 4 deletions
diff --git a/main/mdadm/APKBUILD b/main/mdadm/APKBUILD
index 15b72cd13e..8f2a0d4952 100644
--- a/main/mdadm/APKBUILD
+++ b/main/mdadm/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mdadm
pkgver=3.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="a tool for managing Linux Software RAID arrays"
url="http://neil.brown.name/blog/mdadm"
arch="all"
@@ -40,5 +40,5 @@ package() {
md5sums="e18400b5346937a10b021cf728cd7e17 mdadm-3.2.1.tar.gz
ce57e798431f7ab89f9b07a7daaa4852 mdadm.initd
16d2b8eb2e17184357db503470fdd8eb mdadm.confd
-af5bb6e1479bf1d27cf50521af82dae1 mdadm-raid.initd
+ec48f19ee921eb49eb49a845bf01f1ff mdadm-raid.initd
e6dde992d7da016f25161d6637474d26 uclibc-bswap.patch"
diff --git a/main/mdadm/mdadm-raid.initd b/main/mdadm/mdadm-raid.initd
index 73efbe8efd..4692f76534 100644
--- a/main/mdadm/mdadm-raid.initd
+++ b/main/mdadm/mdadm-raid.initd
@@ -6,12 +6,16 @@ depend() {
after modules
}
+array_devices() {
+ awk '/^ARRAY/ {print $2}' /etc/mdadm.conf
+}
+
start() {
[ -f /etc/mdadm.conf ] || return 0
# start all devices that are not already started
[ -f /proc/mdstat ] || modprobe -k md > /dev/null 2>&1
local tostart=
- for i in $(awk '{print $2}' /etc/mdadm.conf); do
+ for i in $(array_devices); do
[ -b "$i" ] && continue
tostart="$tostart $i"
done
@@ -35,7 +39,7 @@ stop() {
[ -f /etc/mdadm.conf ] || return 0
ebegin "Stopping RAID devices"
local tostop=
- for i in $(awk '{print $2}' /etc/mdadm.conf); do
+ for i in $(array_devices); do
is_mounted_as $i / && continue
tostop="$tostop $i"
done