From 70e4a5d19faccb9ddaeb3eb530d79d1157c74914 Mon Sep 17 00:00:00 2001 From: Anathema Date: Sun, 4 Sep 2011 16:41:33 +0200 Subject: [PATCH] fixed #40, added a check to $keyfile in decode_key(), which abort the execution of tomb in case of keyfile already present --- src/tomb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tomb b/src/tomb index 76b632e..8cf5a2d 100755 --- a/src/tomb +++ b/src/tomb @@ -726,6 +726,10 @@ decode_key() { fi keyfile=${tombname%%\.*}.tomb.key + if [[ -e "$keyfile" ]]; then + error "Key file $keyfile already exist." + return 1 + fi notice "Trying to exhume a key out of image $imagefile" for c in 1 2 3; do if [ $c = 1 ]; then