bashrc: ssh-agent works when multiple users have the same conf on the same machine

This commit is contained in:
nemunaire 2014-02-28 10:32:41 +01:00
parent 87cd9117ab
commit bc59a395e1
1 changed files with 4 additions and 4 deletions

View File

@ -65,11 +65,11 @@ PS1=$PS1'\[`if [ $? -eq 0 ]; then echo -ne "\033[0;32m"; else echo -ne "\033[0;3
PS1=$PS1'\$\[\033[0m\] '
#Agent SSH
if [ ! -f /tmp/ssh-agent.profile ]; then
ssh-agent > /tmp/ssh-agent.profile
chmod 400 /tmp/ssh-agent.profile
if [ ! -f /tmp/ssh-agent.$USER ]; then
ssh-agent > /tmp/ssh-agent.$USER
chmod 400 /tmp/ssh-agent.$USER
fi
source /tmp/ssh-agent.profile > /dev/null
source /tmp/ssh-agent.$USER > /dev/null
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases