diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2025-01-14 10:28:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2025-01-14 10:28:57 +0000 |
commit | 1d7738aaaf36152d633273c2fc622b7beb64c482 (patch) | |
tree | f0ddcd830491109d4788cd99248e3c04c82a57b3 /tests/env-ddf-template | |
parent | Releasing debian version 4.3+20241202-1.1. (diff) | |
download | mdadm-1d7738aaaf36152d633273c2fc622b7beb64c482.tar.xz mdadm-1d7738aaaf36152d633273c2fc622b7beb64c482.zip |
Merging upstream version 4.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/env-ddf-template | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/env-ddf-template b/tests/env-ddf-template index 90d7272..4f4ad0f 100644 --- a/tests/env-ddf-template +++ b/tests/env-ddf-template @@ -3,10 +3,8 @@ sha1_sum() { } get_rootdev() { - local dev=$(stat -c %D /) - local maj=$(expr $dev : '\(..*\)..') - local min=${dev#$maj} - local bd=/dev/$(basename $(readlink /sys/dev/block/$((0x$maj)):$((0x$min)))) + local part=$(grep ' / ' /proc/mounts | awk '{print $1}') + local bd=/dev/$(lsblk -no PKNAME $part) [ -b $bd ] || exit 1 echo $bd } |