From ad993fafc2bd05b651b46edf9e12da8d5dec4a99 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 23 Mar 2022 20:19:13 +0100 Subject: fixes --- .bash/exec.bash | 9 ++++++--- .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 -- cgit v1.2.3