diff options
| -rw-r--r-- | .bash/postexec.bash | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/.bash/postexec.bash b/.bash/postexec.bash index b2f257e..564356a 100644 --- a/.bash/postexec.bash +++ b/.bash/postexec.bash @@ -1,4 +1,8 @@  declare -x SSH_AUTH_SOCK SSH_AGENT_PID  if [ -n "$SSHENVFILE" ] && [ -r "$SSHENVFILE" ];then -	source "$SSHENVFILE" +	if source "$SSHENVFILE"; then +		if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)$" > /dev/null;then +			add-sshagent-init +		fi +	fi  fi | 
