remove $SSH_AUTH_SOCK before restarting ssh-agent

This commit is contained in:
Josh Holtrop 2012-01-15 20:44:01 -05:00
parent 478b04473f
commit a7a960aed5

1
bashrc
View File

@ -15,6 +15,7 @@ if [ -e /bin/cygwin1.dll ]; then
if [ $? = 2 ]; then if [ $? = 2 ]; then
# exit status 2 means we couldn't connect to ssh-agent, # exit status 2 means we couldn't connect to ssh-agent,
# so let's start one now # so let's start one now
rm -f $SSH_AUTH_SOCK
ssh-agent -a $SSH_AUTH_SOCK >/tmp/.ssh-script ssh-agent -a $SSH_AUTH_SOCK >/tmp/.ssh-script
. /tmp/.ssh-script . /tmp/.ssh-script
echo $SSH_AGENT_PID >/tmp/.ssh-agent-pid echo $SSH_AGENT_PID >/tmp/.ssh-agent-pid