Since gpg-agent is being run through the $STARTUP chain, sourcing that $PID_FILE seems unnecessary if gpg-agent gets actually invoked by this script. If I get things correctly, this sourcing part of the script is only intended to recover access to a (leftover?) gpg-agent that is already running when this script is entered.
Since gpg-agent is being run through the $STARTUP chain, sourcing that $PID_FILE seems unnecessary if gpg-agent gets actually invoked by this script. If I get things correctly, this sourcing part of the script is only intended to recover access to a (leftover?) gpg-agent that is already running when this script is entered.
Maybe your problem is related to this one instead: /bugs.launchpad .net/ubuntu/ +source/ gnupg2/ +bug/743268
https:/
I applied that patch given there and everything works fine.