bashrc to ssh-agent bugfixes; removing rc.local behavior from ShadowArch install

This commit is contained in:
DarkFeather
2019-05-18 11:10:39 -05:00
parent 47582d77e3
commit bf08781422
2 changed files with 1 additions and 15 deletions

View File

@@ -48,7 +48,7 @@ fi
# Tell shell about ssh-agent -- enable with 'systemctl enable ssh-agent@$USER.service'
export SSH_AGENT_PID="$(ps -fu "$USER" | grep -v grep | grep -m 1 ssh-agent | awk '{ print $2; }')"
if [ -n "$SSH_AGENT_PID" ]; then
export SSH_AUTH_SOCK="$(ls -1 /tmp/ssh-*/agent.$(( $SSH_AGENT_PID - 1 )))"
export SSH_AUTH_SOCK="$(ls -ld /tmp/ssh-*/agent.* | grep -m 1 "$USER" | awk '{ print $9; }')"
echo ssh-agent PID is $SSH_AGENT_PID
fi
# Set up screen/tmux safety nest by default for remote sessions