Merge pull request #17 from davinerd/fix_issue3

fix issue #3
create now avoids ovewriting an existing tomb key: quits with error.
This commit is contained in:
DJR 2011-08-01 13:31:50 -07:00
commit 7b2fc78b19

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}"