diff --git a/src/tomb b/src/tomb index cf7bf85..c593d46 100755 --- a/src/tomb +++ b/src/tomb @@ -85,11 +85,6 @@ act "" func "invoked with args \"$*\" " func "running on `date`" -id | grep root > /dev/null -if [ $? != 0 ]; then - error "This program must be run as root to produce results" - exit 1 -fi OPTS=`getopt -o hvs:k: -n 'tomb' -- "$@"` @@ -102,7 +97,7 @@ while true; do act "-h print this help" act "-v print out the version information for this tool" act "-s size of the storage file when creating one (in MBytes)" - act "-k path key to be used for decryption (defaults in ~/.tomb)" + act "-k path to the key to use for decryption" act "" notice "Commands:" act "create create a new encrypted storage FILE and keys" @@ -126,11 +121,18 @@ BEGIN { license=0 } esac done + if [ -z $CMD ]; then error "first argument missing, use -h for help" exit 0 fi +id | grep root > /dev/null +if [ $? != 0 ]; then + error "This program must be run as root to produce results" + exit 1 +fi + func "command: $CMD for file $FILE" tombdir=${HOME}/.tomb