diff options
Diffstat (limited to 'kshrc')
| -rw-r--r-- | kshrc | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -346,6 +346,7 @@ checkSSHAgentForward() { checkSSHAgent() { if [ "$1" = "-k" ] ; then pkill -9 ssh-agent + return fi # So OpenSSH 10.1 steps on my old configuration, rather than passing in -T @@ -360,6 +361,17 @@ checkSSHAgent() { #shellcheck disable=SC1090 . "$ssh_agent_conf" fi + + # We likely have busybox, assume we have to check /proc instead + if [ -L "$(command -v ps)" ] ; then + if ! [ -d /proc/"$SSH_AGENT_PID" ] ; then + ssh-agent -s | grep -v echo > "$ssh_agent_conf" + fi + #shellcheck disable=SC1090 + . "$ssh_agent_conf" + return + fi + #shellcheck disable=SC2009 if ! ps aux | awk '{print $2}' | grep -q "$SSH_AGENT_PID" \ || ! [ -e "$ssh_agent_conf" ] \ |
