Showing
2 changed files
with
3 additions
and
4 deletions
... | ... | @@ -45,11 +45,11 @@ function ssh-init-agent() { |
45 | 45 | local ECHO="/bin/echo" |
46 | 46 | local SSH_AGENT="/usr/bin/ssh-agent" |
47 | 47 | |
48 | - [[ -e "${SSH_AGENT_FILE}" ]] && eval `${CAT} "${SSH_AGENT_FILE}"` >/dev/null | |
48 | + [[ -e "${SSH_AGENT_FILE}" ]] && eval $(${CAT} "${SSH_AGENT_FILE}") >/dev/null | |
49 | 49 | |
50 | 50 | if [[ "x" != x${SSH_AGENT_PID} ]] |
51 | 51 | then |
52 | - if [[ "ssh-agent" = "`${PS} -p ${SSH_AGENT_PID} -o comm=`" ]] | |
52 | + if [[ "ssh-agent" = "$(${PS} -p ${SSH_AGENT_PID} -o comm=)" ]] | |
53 | 53 | then |
54 | 54 | return |
55 | 55 | fi |
... | ... | @@ -59,7 +59,7 @@ function ssh-init-agent() { |
59 | 59 | ${SSH_AGENT} >"${SSH_AGENT_FILE}" |
60 | 60 | if [[ 0 -eq $? ]] |
61 | 61 | then |
62 | - eval `${CAT} "${SSH_AGENT_FILE}"` >/dev/null | |
62 | + eval $(${CAT} "${SSH_AGENT_FILE}") >/dev/null | |
63 | 63 | ${ECHO} "OK" |
64 | 64 | ssh-add |
65 | 65 | else | ... | ... |
Please
register
or
login
to post a comment