Fix exit code for 10_ssh-agent

This commit is contained in:
斟酌 鵬兄 2014-10-10 10:21:44 +08:00
parent b85d97ddcf
commit 2e34160534

View File

@ -8,7 +8,15 @@ function start_agent {
echo succeeded echo succeeded
chmod 600 "${SSH_ENV}" chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null . "${SSH_ENV}" > /dev/null
# Test the ssh-add if status return 0/1, agent is initialized
/usr/bin/ssh-add; /usr/bin/ssh-add;
ST=$?
if [ $ST -ne 0 ] && [ $ST -ne 1 ]; then
return $ST
fi
return 0
} }
# Source SSH settings, if applicable # Source SSH settings, if applicable