summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormwilck@arcor.de <mwilck@arcor.de>2013-09-25 22:42:00 +0200
committerNeilBrown <neilb@suse.de>2013-10-16 15:31:30 +1100
commite00d9c10c1198302b81ab2da809d72eb3b4b1cda (patch)
tree6a8be06e4b108f17b80e25f5422084d3652ad85e /tests
parentd5b8e3406107ce09ea16f5f275dfd25a698917ec (diff)
downloadmdadm-e00d9c10c1198302b81ab2da809d72eb3b4b1cda.tar.gz
tests/env-ddf-template: add helper function for checksums
Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/env-ddf-template4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/env-ddf-template b/tests/env-ddf-template
index cc9cc2b..c0a4b71 100644
--- a/tests/env-ddf-template
+++ b/tests/env-ddf-template
@@ -1,3 +1,7 @@
+sha1_sum() {
+ sha1sum "$1" | cut -c 1-40
+}
+
get_rootdev() {
local dev=$(stat -c %D /)
local maj=$(expr $dev : '\(..\)')