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: https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/743268 I applied that patch given there and everything works fine. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/804641 Title: gpg-agent incorrectly detects currently running daemons To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/804641/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs