1
0
Fork 0

fix(module/ssh): Fix error when enable module

USER is replace by 'id -un' to avoid error due to the USER no set
pull/762/head
Frédéric Combes 10 years ago
parent d43bcb9720
commit 5eb33e13b9

@ -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 "$USER" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
if ! ps -U "$(id -un)" -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