;;
esac
+## Some useful variables.
+hostname=${HOST-$(hostname)}
+user=${USER-${LOGNAME-$(id -un)}}
+dir=$TMPDIR/.ssh-agent.$hostname.$user
+socket=$dir/sock; pid=$dir/pid
+
### Should I start a new agent?
case "$force,$SSH_AUTH_SOCK" in
t,* | nil,)
### If so, do that
case $foundp in
nil)
- hostname=${HOST-$(hostname)}
- user=${USER-${LOGNAME-$(whoami)}}
- dir=$TMPDIR/.ssh-agent.$hostname.$user; socket=$dir/sock; pid=$dir/pid
mkdir -p -m700 "$dir"
SSH_AUTH_SOCK=$socket; export SSH_AUTH_SOCK
set +e; ssh-add -l >/dev/null 2>&1; rc=$?; set -e