mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-23 02:28:58 +00:00
some more fixes for the guided generation
This commit is contained in:
parent
c610e6dacc
commit
9f8c321a43
13
src/tomb
13
src/tomb
@ -453,7 +453,7 @@ create_tomb() {
|
|||||||
notice "Your tomb is ready on ${FILE} and secured with key ${FILE}.gpg"
|
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 "Would you like to save the key on an external usb device?"
|
||||||
act "This is recommended for safety:"
|
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)"
|
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?"
|
tomb-notify "Tomb has forged a key." "Would you like to save it on USB?"
|
||||||
echo -n " > "
|
echo -n " > "
|
||||||
@ -468,11 +468,20 @@ create_tomb() {
|
|||||||
chmod -R go-rwx ${usbkey_mount}/.tomb
|
chmod -R go-rwx ${usbkey_mount}/.tomb
|
||||||
umount ${usbkey_mount}
|
umount ${usbkey_mount}
|
||||||
unset ${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
|
${WIPE[@]} ${FILE}.gpg
|
||||||
fi
|
fi
|
||||||
|
else # kept besides (deprecated behaviour)
|
||||||
|
act "now we proceed opening your new tomb"
|
||||||
|
KEY=${FILE}.gpg
|
||||||
|
mount_tomb ${FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tomb mount $FILE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ try() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# got an argument
|
# got an argument
|
||||||
if [ $1 ]; then
|
if [ $1 ]; then
|
||||||
# is it a tomb?
|
# is it a tomb?
|
||||||
@ -102,11 +101,7 @@ Create a new Tomb
|
|||||||
have your USB key and your password.
|
have your USB key and your password.
|
||||||
|
|
||||||
If you choose to proceed now, we'll guide you through the creation
|
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
|
of a new Tomb.
|
||||||
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.
|
|
||||||
|
|
||||||
If you will, I'll be your Crypto Undertaker.
|
If you will, I'll be your Crypto Undertaker.
|
||||||
Do you want to proceed, Master? (y/n)
|
Do you want to proceed, Master? (y/n)
|
||||||
EOF
|
EOF
|
||||||
@ -127,8 +122,17 @@ read size
|
|||||||
echo " You have commanded the creation of this Tomb:"
|
echo " You have commanded the creation of this Tomb:"
|
||||||
echo " $filename ( $size MBytes )";
|
echo " $filename ( $size MBytes )";
|
||||||
echo
|
echo
|
||||||
echo " Please confirm if you want to proceed now,"
|
cat <<EOF
|
||||||
echo " digging will take quite some time! (y/n)"
|
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 "> "
|
echo -n "> "
|
||||||
read -q
|
read -q
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
@ -146,7 +150,14 @@ tomb create ${filename}.tomb $size
|
|||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "An error occurred creating tomb, operation aborted."
|
echo "An error occurred creating tomb, operation aborted."
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
# if ! [ -r /usr/share/applications/tomb.desktop ]; then
|
# if ! [ -r /usr/share/applications/tomb.desktop ]; then
|
||||||
# echo " Well done!"
|
# echo " Well done!"
|
||||||
# echo " Now the last thing to do is to install Tomb on your desktop:"
|
# echo " Now the last thing to do is to install Tomb on your desktop:"
|
||||||
|
Loading…
Reference in New Issue
Block a user