1
0
Fork 0

fix(ssh): Use LOGNAME instead of USER or (id -un)

pull/762/head
Frédéric Combes 10 years ago
parent 5eb33e13b9
commit 21e0372b7d

@ -25,7 +25,7 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
source "$_ssh_agent_env" 2> /dev/null
# Start ssh-agent if not started.
if ! ps -U "$(id -un)" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi
fi

Loading…
Cancel
Save