aboutsummaryrefslogtreecommitdiffstats
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-24 13:33:26 +0000
commit5bbd39ada7b3872cef665283c7acba70675c1847 (patch)
tree35e6fe81f3cc34454272d7427858983ad7d66bef /main/mdadm
parent38bdc2dd51e61fb63e0f4fa531679a290faee310 (diff)
downloadaports-5bbd39ada7b3872cef665283c7acba70675c1847.tar.bz2
aports-5bbd39ada7b3872cef665283c7acba70675c1847.tar.xz
main/mdadm: init.d script ignore comments in mdadm.conf
fixes #652 (cherry picked from commit da2ac01c0ce27f102ee58913eb257aaabf592614)
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 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