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

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\] ' PS1=$PS1'\$\[\033[0m\] '
#Agent SSH #Agent SSH
if [ ! -f /tmp/ssh-agent.profile ]; then if [ ! -f /tmp/ssh-agent.$USER ]; then
ssh-agent > /tmp/ssh-agent.profile ssh-agent > /tmp/ssh-agent.$USER
chmod 400 /tmp/ssh-agent.profile chmod 400 /tmp/ssh-agent.$USER
fi fi
source /tmp/ssh-agent.profile > /dev/null source /tmp/ssh-agent.$USER > /dev/null
if [ -f ~/.bash_aliases ]; then if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases . ~/.bash_aliases