aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fripost-partman-udeb/base.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh
index f58d457..329bd35 100644
--- a/src/fripost-partman-udeb/base.sh
+++ b/src/fripost-partman-udeb/base.sh
@@ -651,16 +651,17 @@ fripost_mdadm_create() {
/sbin/mdadm --create "$md" "$@"
wait_for_device "$md"
- device=$(/usr/bin/readlink -f "$md")
- device="${device#/dev/}"
+ #device=$(/usr/bin/readlink -f "$md")
+ device="${md#/dev/}"
level=$(sed -nr "/^$device\s*:/ s/.*:\s*active (\S+) .*/\1/p" /proc/mdstat)
devices=$(sed -nr "/^$device\s*:/ s/.*:\s*active \S+ //p" /proc/mdstat)
size=$(sed -nr "/^$device\s*:/ {n; s/^\s*([0-9]+)\s+blocks\s.*/\1/p}" /proc/mdstat)
info=$(sed -nr "/^$device\s*:/ {n; s/^.*\s(super\s.*)/\1/p}" /proc/mdstat)
- if ! [ "$level" -a "$devices" -a "$size" -a "$info" ] && [ $size -gt 0 ]; then
+ if ! [ "$level" -a "$devices" -a "$size" ] && [ $size -gt 0 ]; then
log < /proc/mdstat
- fail "Couldn't find entry $device ($md) in /proc/mdstat"
+ echo "Couldn't find entry $device ($md) in /proc/mdstat" >&2
+ exit 1
fi
db_subst fripost/mdadm_create_progress_title MD "$md"