mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-29 08:14:08 +00:00
fixes cryptsetup and gpg binary paths on debian
This commit is contained in:
parent
c188c47679
commit
c46596987c
10
src/tomb
10
src/tomb
@ -136,10 +136,14 @@ progress() {
|
|||||||
|
|
||||||
check_bin() {
|
check_bin() {
|
||||||
# check for required programs
|
# 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
|
which $req >/dev/null || die "Cannot find $req. Please install it." 1
|
||||||
done
|
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 dd command to use
|
||||||
which dcfldd > /dev/null && DD=dcfldd || DD=dd
|
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 \
|
--openpgp --batch --no-options --no-tty --passphrase-fd 0 2>/dev/null \
|
||||||
-o "${tombkey}" -c -a ${keytmp}/tomb.tmp <<< ${tombpass}
|
-o "${tombkey}" -c -a ${keytmp}/tomb.tmp <<< ${tombpass}
|
||||||
|
|
||||||
|
unset tombpass
|
||||||
|
|
||||||
# if [ $? != 0 ]; then
|
# if [ $? != 0 ]; then
|
||||||
# _warning "setting password failed: gnupg returns 2"
|
# _warning "setting password failed: gnupg returns 2"
|
||||||
# umount ${keytmp}
|
# umount ${keytmp}
|
||||||
@ -1198,6 +1204,8 @@ change_passwd() {
|
|||||||
--openpgp --batch --no-options --no-tty --passphrase-fd 0 \
|
--openpgp --batch --no-options --no-tty --passphrase-fd 0 \
|
||||||
-o "${tmpnewkey}" -c -a ${tmpoldkey} <<< ${tombpass}
|
-o "${tmpnewkey}" -c -a ${tmpoldkey} <<< ${tombpass}
|
||||||
|
|
||||||
|
unset tombpass
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
_warning "Cannot change your key passphrase"
|
_warning "Cannot change your key passphrase"
|
||||||
# /dev/null because the file cannot exists
|
# /dev/null because the file cannot exists
|
||||||
|
Loading…
Reference in New Issue
Block a user