diff options
author | mail_redacted_for_web | 2022-03-23 20:19:13 +0100 |
---|---|---|
committer | mail_redacted_for_web | 2022-03-23 20:19:13 +0100 |
commit | ad993fafc2bd05b651b46edf9e12da8d5dec4a99 (patch) | |
tree | 3f127ddda957a37373c0563d623dd7c7cd816b21 /.bash | |
parent | 2ebd4f1d0db6d9884a66be495edcbe67fe0d80d3 (diff) | |
download | dotfiles-ad993fafc2bd05b651b46edf9e12da8d5dec4a99.tar.bz2 |
fixes
Diffstat (limited to '.bash')
-rw-r--r-- | .bash/exec.bash | 9 | ||||
-rw-r--r-- | .bash/vars.bash | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/.bash/exec.bash b/.bash/exec.bash index e8fdb9d..24b3ee9 100644 --- a/.bash/exec.bash +++ b/.bash/exec.bash @@ -7,9 +7,12 @@ set bell-style visible # start ssh agent. this script will not try to run a new instance # (unless we specified -f, which we don't). -if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)" > /dev/null;then - "$HOME/bin/ssh-agent-launcher" -q - gpg-connect-agent --dirmngr /bye +if echo "${SSHAGH[@]}" | grep -F --word-regexp "$(hostname -f)" > /dev/null;then + # do not launch from SSH session, conflicts with user logging on locally afterwards + if [ -z "$SSH_TTY" ];then + "$HOME/bin/ssh-agent-launcher" -q + gpg-connect-agent --dirmngr /bye + fi fi # because on some hosts the login path is fucked, unset in .local diff --git a/.bash/vars.bash b/.bash/vars.bash index 088e1e9..773d75d 100644 --- a/.bash/vars.bash +++ b/.bash/vars.bash @@ -1,5 +1,6 @@ #!/usr/bin/env bash # vim:syntax=sh +# shellcheck disable=SC2034,SC1091 # default Byobu session name export BSNAME="CHANGEME" @@ -86,6 +87,6 @@ fi # SSH environment file #!/usr/bin/env bash # vim:syntax=sh -if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)" > /dev/null;then +#if echo "${SSHAGH[@]}" | grep -F --word-regexp "$(hostname -f)" > /dev/null;then export SSHENVFILE="${HOME}/.ssh/sshenv" -fi +#fi |