create agents default dir on bash-start
This commit is contained in:
parent
59cb209684
commit
3fad3ae6e8
1 changed files with 8 additions and 5 deletions
|
@ -136,11 +136,6 @@ export -f reachable-default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cat << EOF > ~/.ssh/agents/agent-default-$(hostname)
|
|
||||||
SSH_AUTH_SOCK=${SSH_AUTH_SOCK}; export SSH_AUTH_SOCK;
|
|
||||||
SSH_AGENT_PID=${SSH_AGENT_PID}; export SSH_AGENT_PID;
|
|
||||||
loginfo Agent pid ${SSH_AGENT_PID};
|
|
||||||
EOF
|
|
||||||
|
|
||||||
[ -z "${SSH_IDENTITIES_DEFAULT_DIR+x}" ] && { SSH_IDENTITIES_DEFAULT_DIR="${HOME}/.ssh/identities"; export SSH_IDENTITIES_DEFAULT_DIR; }
|
[ -z "${SSH_IDENTITIES_DEFAULT_DIR+x}" ] && { SSH_IDENTITIES_DEFAULT_DIR="${HOME}/.ssh/identities"; export SSH_IDENTITIES_DEFAULT_DIR; }
|
||||||
[ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] && { SSH_AGENTS_DEFAULT_DIR="${HOME}/.ssh/agents"; export SSH_AGENTS_DEFAULT_DIR; }
|
[ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] && { SSH_AGENTS_DEFAULT_DIR="${HOME}/.ssh/agents"; export SSH_AGENTS_DEFAULT_DIR; }
|
||||||
|
@ -148,3 +143,11 @@ EOF
|
||||||
[ -z "${SSH_AGENT_DEFAULT_OPTIONS+x}" ] && { SSH_AGENT_DEFAULT_OPTIONS='-t 7200'; export SSH_AGENT_DEFAULT_OPTIONS; }
|
[ -z "${SSH_AGENT_DEFAULT_OPTIONS+x}" ] && { SSH_AGENT_DEFAULT_OPTIONS='-t 7200'; export SSH_AGENT_DEFAULT_OPTIONS; }
|
||||||
[ -z "${SSH_ADD_DEFAULT_OPTIONS+x}" ] && { SSH_ADD_DEFAULT_OPTIONS="-t 7200"; export SSH_ADD_DEFAULT_OPTIONS; }
|
[ -z "${SSH_ADD_DEFAULT_OPTIONS+x}" ] && { SSH_ADD_DEFAULT_OPTIONS="-t 7200"; export SSH_ADD_DEFAULT_OPTIONS; }
|
||||||
[ -z "${SSH_DEFAULT_IDENTITY+x}" ] && { SSH_DEFAULT_IDENTITY="default"; export SSH_DEFAULT_IDENTITY; }
|
[ -z "${SSH_DEFAULT_IDENTITY+x}" ] && { SSH_DEFAULT_IDENTITY="default"; export SSH_DEFAULT_IDENTITY; }
|
||||||
|
|
||||||
|
[ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] || mkdir -p "${SSH_AGENTS_DEFAULT_DIR}"
|
||||||
|
|
||||||
|
cat << EOF > ${SSH_AGENTS_DEFAULT_DIR}"/agent-default-$(hostname)
|
||||||
|
SSH_AUTH_SOCK=${SSH_AUTH_SOCK}; export SSH_AUTH_SOCK;
|
||||||
|
SSH_AGENT_PID=${SSH_AGENT_PID}; export SSH_AGENT_PID;
|
||||||
|
loginfo Agent pid ${SSH_AGENT_PID};
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue