fixed #40, added a check to $keyfile in decode_key(), which abort the execution of tomb in case of keyfile already present

This commit is contained in:
Anathema 2011-09-04 16:41:33 +02:00 committed by Jaromil
parent 86db18b386
commit 70e4a5d19f

View File

@ -726,6 +726,10 @@ decode_key() {
fi fi
keyfile=${tombname%%\.*}.tomb.key 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" notice "Trying to exhume a key out of image $imagefile"
for c in 1 2 3; do for c in 1 2 3; do
if [ $c = 1 ]; then if [ $c = 1 ]; then