]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
tests/env-ddf-template: add helper function for checksums
authormwilck@arcor.de <mwilck@arcor.de>
Wed, 25 Sep 2013 20:42:00 +0000 (22:42 +0200)
committerNeilBrown <neilb@suse.de>
Wed, 16 Oct 2013 04:31:30 +0000 (15:31 +1100)
Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
tests/env-ddf-template

index cc9cc2b7f880c7246e9894ad6dbbbd39cf064369..c0a4b71364451dceccc7c856f64d69c3fa9d3d72 100644 (file)
@@ -1,3 +1,7 @@
+sha1_sum() {
+    sha1sum "$1" | cut -c 1-40
+}
+
 get_rootdev() {
     local dev=$(stat -c %D /)
     local maj=$(expr $dev : '\(..\)')