fixed issue #3: a simple file check on the key is now performed before creating the tomb

This commit is contained in:
Anathema 2011-08-01 22:11:57 +02:00
parent b18ef6c27b
commit 3f0d3dabfc

View File

@ -311,9 +311,15 @@ create_tomb() {
tombfile=${tombname}.tomb
if [ -e ${tombdir}/${tombfile} ]; then
error "tomb exists already. I'm not digging here:"
ls -lh ${tombdir}/${tombfile}
return 1
error "tomb exists already. I'm not digging here:"
ls -lh ${tombdir}/${tombfile}
return 1
fi
if [ -e ${tombdir}/${tombfile}.key ]; then
error "tomb key already exists. Quitting."
ls -lh ${tombdir}/${tombfile}.key
return 1
fi
notice "Creating a new tomb in ${tombdir}/${tombfile}"