summaryrefslogtreecommitdiffstats
path: root/main/mdadm
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-05-23 13:13:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-05-23 13:13:04 +0000
commitda2ac01c0ce27f102ee58913eb257aaabf592614 (patch)
treedf6ed6501005ef7b115cbee0fe1ec90457bd74cf /main/mdadm
parentd1d78c1b75dfb91a2cd8322f52078f2ff8a51c7e (diff)
downloadaports-da2ac01c0ce27f102ee58913eb257aaabf592614.tar.bz2
aports-da2ac01c0ce27f102ee58913eb257aaabf592614.tar.xz
main/mdadm: init.d script ignore comments in mdadm.conf
ref #652
Diffstat (limited to 'main/mdadm')
-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 15b72cd13..8f2a0d495 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 73efbe8ef..4692f7653 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