some more fixes for the guided generation

This commit is contained in:
Jaromil 2011-02-10 14:59:20 +01:00
parent c610e6dacc
commit 9f8c321a43
2 changed files with 30 additions and 10 deletions

View File

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

View File

@ -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:"