#
# If ssh is configured and ssh-agent is wanted set "yes"
# or gpg-agent *with* ssh support is wanted set "gpg"
#

: ${usessh:=yes}

#
# No ssh-agent if a ssh session is already provided by an other agent.
#
if test "$usessh" = yes -a -n "$GNOME_KEYRING_PID" ; then
    if test -S "$GNOME_KEYRING_SOCKET" -o -d "$GNOME_KEYRING_CONTROL"; then
	usessh=no
    fi
fi
