summaryrefslogtreecommitdiffstats
path: root/tests/env-ddf-template
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2025-01-14 10:28:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2025-01-14 10:28:57 +0000
commit1d7738aaaf36152d633273c2fc622b7beb64c482 (patch)
treef0ddcd830491109d4788cd99248e3c04c82a57b3 /tests/env-ddf-template
parentReleasing debian version 4.3+20241202-1.1. (diff)
downloadmdadm-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-template6
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
}