From d33c2def03a643948aee87ace906b1ca322da225 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 13 Jul 2006 09:20:41 +0000 Subject: [PATCH] * Add support for ssh-agent to bashrc --- .bashrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.bashrc b/.bashrc index 5f3c7da..63ffd49 100644 --- a/.bashrc +++ b/.bashrc @@ -46,6 +46,17 @@ if [ "$PS1" ]; then if [ -f /etc/bash_completion ]; then . /etc/bash_completion; fi; + + # set up ssh-agent + if which ssh-agent >/dev/null && [ -d ~/.ssh ]; then + if [ -e ~/.ssh/ssh_agent_info ] && \ + kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)"; then + . ~/.ssh/ssh_agent_info > /dev/null + else + ssh-agent -s > ~/.ssh/ssh_agent_info + . ~/.ssh/ssh_agent_info > /dev/null + fi; + fi; alias aumix2='aumix -d /dev/mixer1 -I' if locale -a |grep -qi en_US.utf8; then -- 2.39.2