diff options
Diffstat (limited to 'tests/env-ddf-template')
-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 90d7272f..4f4ad0f3 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 } |