commit 70e4a5d19faccb9ddaeb3eb530d79d1157c74914
parent 86db18b3860c276ed18ca6df88bc646d27c9d14b
Author: Anathema <anathema@anche.no>
Date: Sun, 4 Sep 2011 16:41:33 +0200
fixed #40, added a check to $keyfile in decode_key(), which abort the execution of tomb in case of keyfile already present
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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