1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-15 04:03:41 +01:00

Another try for gpg 2.1.11 fix

This commit is contained in:
deajan 2020-05-04 11:30:36 +01:00
parent deb28458b1
commit ac7f0376f5

View File

@ -333,7 +333,7 @@ function test_GPG () {
# Detect if GnuPG >= 2.1 that does not allow automatic pin entry anymore # Detect if GnuPG >= 2.1 that does not allow automatic pin entry anymore
# GnuPG 2.1.11 has a bug that does not allow usage of pinentry mode 'loopback' # GnuPG 2.1.11 has a bug that does not allow usage of pinentry mode 'loopback'
# GnuPC 2.1.22 has that bug resolved # GnuPC 2.1.12 has that bug resolved
cryptToolVersion=$($CRYPT_TOOL --version | head -1 | awk '{print $3}') cryptToolVersion=$($CRYPT_TOOL --version | head -1 | awk '{print $3}')
cryptToolMajorVersion=${cryptToolVersion%%.*} cryptToolMajorVersion=${cryptToolVersion%%.*}
@ -349,7 +349,9 @@ function test_GPG () {
additionalParameters="--pinentry-mode loopback" additionalParameters="--pinentry-mode loopback"
elif [ $cryptToolMinorVersion -eq 11 ]; then elif [ $cryptToolMinorVersion -eq 11 ]; then
echo "Using fix to allow --pinentry-mode loopback" echo "Using fix to allow --pinentry-mode loopback"
echo "allow-loopback-pinentry" >> {$HOME}/.gnupg/gpg-agent.conf [ -f "{$HOME}/.gnupg/gpg-agent.conf" ] || touch "{$HOME}/.gnupg/gpg-agent.conf"
echo "allow-loopback-pinentry" >> "{$HOME}/.gnupg/gpg-agent.conf"
gpgconf --reload gpg-agent
else else
echo "Not using --pinentry-mode loopback [$cryptToolMajorVersion.$cryptToolSubVersion.$cryptToolMinorVersion]" echo "Not using --pinentry-mode loopback [$cryptToolMajorVersion.$cryptToolSubVersion.$cryptToolMinorVersion]"
fi fi