From 5176a509beccabdbe30cbd3420580dea441b12bb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 12 Aug 2014 10:19:06 -0400 Subject: [PATCH] split ssh-agent & gpg-agent loading --- .profile.d/keychain.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.profile.d/keychain.sh b/.profile.d/keychain.sh index 14a6289..7f0ef65 100644 --- a/.profile.d/keychain.sh +++ b/.profile.d/keychain.sh @@ -1,9 +1,12 @@ # If an auth sock is already set & available, use it. # This way ssh agent forwarding still works. -if [ ! -S "${SSH_AUTH_SOCK}" ] ; then - if type keychain >/dev/null 2>&1 ; then +if type keychain >/dev/null 2>&1 ; then + if [ ! -S "${SSH_AUTH_SOCK}" ] ; then : ${HOSTNAME:=$(hostname)} [ -e ~/.keychain/${HOSTNAME}-sh ] && . ~/.keychain/${HOSTNAME}-sh + fi + if [ -z "${GPG_AGENT_INFO}" ] ; then + : ${HOSTNAME:=$(hostname)} [ -e ~/.keychain/${HOSTNAME}-sh-gpg ] && . ~/.keychain/${HOSTNAME}-sh-gpg fi fi -- 2.39.5