diff options
author | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-07-31 10:28:13 +0000 |
---|---|---|
committer | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-07-31 10:28:13 +0000 |
commit | 56d39c39c78cb421800c3e8eac49503f10b33c37 (patch) | |
tree | 9bbc61a7718124b8d86c66c600006bb8ca40416e /debian/mdadm.config | |
parent | f5735981a52db6997483afbc58349ec5e3c3dc85 (diff) |
added detection for partitionable arrays
Diffstat (limited to 'debian/mdadm.config')
-rw-r--r-- | debian/mdadm.config | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/debian/mdadm.config b/debian/mdadm.config index 7c15ac01..fc469c82 100644 --- a/debian/mdadm.config +++ b/debian/mdadm.config @@ -77,17 +77,20 @@ while true; do ARRAYS='' ERROR=0 for i in $INITRDSTART; do + + # just in case people use commas between devices + i="${i%,}" + + # standardise by prefixing /dev/ + case "$i" in md*) i="/dev/$i";; *) :;; esac + + # remove partition from name of partitionable devices + i="${i%p[0-9]*}" + case "$i" in - /dev/md*) - t=${i%,} # just in case people use commas between devices - [ -b "$t" ] && ARRAYS="${ARRAYS:+$ARRAYS }$t" && continue - echo "E: invalid device: $i" >&2 - ERROR=1; break - ;; - md*) - t=/dev/${i%,} # just in case people use commas between devices - [ -b "$t" ] && ARRAYS="${ARRAYS:+$ARRAYS }$t" && continue - echo "E: invalid device: $i" >&2 + /dev/md[0-9]*|/dev/md_d[0-9]*) + [ -b "$i" ] && ARRAYS="${ARRAYS:+$ARRAYS }$i" && continue + echo "E: device does not exist: $i" >&2 ERROR=1; break ;; *) |