diff options
Diffstat (limited to 'mkshrc')
| -rw-r--r-- | mkshrc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -368,7 +368,10 @@ checkSSHAgent() { if [ -e "$ssh_agent_conf" ] ; then . "$ssh_agent_conf" fi - if ! ps -eo pid | grep -q "$SSH_AGENT_PID" ; then + if ! ps -eo pid | grep -q "$SSH_AGENT_PID" \ + || ! [ -e "$ssh_agent_conf" ] \ + || [ -z "$SSH_AGENT_PID" ] ; \ + then ssh-agent -s | grep -v echo > "$ssh_agent_conf" . "$ssh_agent_conf" fi |
