commit c46596987ccd828a342afd050860fb49f55bf31c
parent c188c4767983a3f76a0d7da91202d96fbd992d31
Author: Jaromil <jaromil@dyne.org>
Date: Fri, 11 May 2012 21:19:51 +0200
fixes cryptsetup and gpg binary paths on debian
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/tomb b/src/tomb
@@ -136,10 +136,14 @@ progress() {
check_bin() {
# check for required programs
- for req in cryptsetup pinentry sudo gpg; do
+ for req in pinentry sudo gpg; do
which $req >/dev/null || die "Cannot find $req. Please install it." 1
done
+ export PATH=/sbin:/usr/sbin:$PATH
+
+ which cryptsetup > /dev/null && CRYPTSETUP=cryptsetup || die "Cryptsetup not found in $PATH." 1
+
# which dd command to use
which dcfldd > /dev/null && DD=dcfldd || DD=dd
@@ -727,6 +731,8 @@ create_tomb() {
--openpgp --batch --no-options --no-tty --passphrase-fd 0 2>/dev/null \
-o "${tombkey}" -c -a ${keytmp}/tomb.tmp <<< ${tombpass}
+ unset tombpass
+
# if [ $? != 0 ]; then
# _warning "setting password failed: gnupg returns 2"
# umount ${keytmp}
@@ -1197,6 +1203,8 @@ change_passwd() {
gpg \
--openpgp --batch --no-options --no-tty --passphrase-fd 0 \
-o "${tmpnewkey}" -c -a ${tmpoldkey} <<< ${tombpass}
+
+ unset tombpass
if [ $? != 0 ]; then
_warning "Cannot change your key passphrase"