tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit 9f8c321a4362216825e1714a032155b78ae3c618
parent c610e6dacc007668dc6dc7e32d7be3e2c90736b3
Author: Jaromil <jaromil@dyne.org>
Date:   Thu, 10 Feb 2011 14:59:20 +0100

some more fixes for the guided generation

Diffstat:
Msrc/tomb | 13+++++++++++--
Msrc/tomb-open | 27+++++++++++++++++++--------
2 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/tomb b/src/tomb @@ -453,7 +453,7 @@ create_tomb() { notice "Your tomb is ready on ${FILE} and secured with key ${FILE}.gpg" act "Would you like to save the key on an external usb device?" act "This is recommended for safety:" - act "always keep the key in a different place than the door!" + act "Always keep the key in a different place than the door!" act "If you answer yes, you'll need a USB KEY now: (y/n)" tomb-notify "Tomb has forged a key." "Would you like to save it on USB?" echo -n " > " @@ -468,11 +468,20 @@ create_tomb() { chmod -R go-rwx ${usbkey_mount}/.tomb umount ${usbkey_mount} unset ${usbkey_mount} + notice "Key ${FILE}.gpg succesfully saved on your USB" + act "now we proceed opening your new tomb" + KEY=${FILE}.gpg + CMD2=${FILE} + CMD3=/media/${FILE} + mount_tomb ${FILE} ${WIPE[@]} ${FILE}.gpg fi + else # kept besides (deprecated behaviour) + act "now we proceed opening your new tomb" + KEY=${FILE}.gpg + mount_tomb ${FILE} fi - tomb mount $FILE } diff --git a/src/tomb-open b/src/tomb-open @@ -33,7 +33,6 @@ try() { - # got an argument if [ $1 ]; then # is it a tomb? @@ -102,11 +101,7 @@ Create a new Tomb have your USB key and your password. If you choose to proceed now, we'll guide you through the creation - of a new Tomb. You will need the super-user (sudo) password for the - computer you are using, as well time available: depending how big - your tomb will be, make sure you are not running low on batteries, - considering 1GB takes little little less than an hour to be digged. - + of a new Tomb. If you will, I'll be your Crypto Undertaker. Do you want to proceed, Master? (y/n) EOF @@ -127,8 +122,17 @@ read size echo " You have commanded the creation of this Tomb:" echo " $filename ( $size MBytes )"; echo -echo " Please confirm if you want to proceed now," -echo " digging will take quite some time! (y/n)" +cat <<EOF + Please confirm if you want to proceed now: + + You will need the super-user (sudo) password for the computer you + are using, as well time available: depending how big your tomb will + be, make sure you are not running low on batteries, or inside a + detachable screen if on a server. Considering 1GB takes usually + little less than an hour to be digged. +EOF +echo " " +echo " Digging will take quite some time! Should we start? (y/n)" echo -n "> " read -q if [ $? != 0 ]; then @@ -146,7 +150,14 @@ tomb create ${filename}.tomb $size if [ $? != 0 ]; then echo "An error occurred creating tomb, operation aborted." exit 1 +else + tombname="${filename%%.*}" + tombmap=`mount -l | awk "/\[${tombname}\]$/"' { print $1 } '` + tombmount=`mount -l | awk "/\[${tombname}\]$/"' { print $3 } '` + tomb-status $tombmap $tombname $tombmount &! fi + + # if ! [ -r /usr/share/applications/tomb.desktop ]; then # echo " Well done!" # echo " Now the last thing to do is to install Tomb on your desktop:"