From 5c45efd5e51511fe6154b4b739e2910e84350836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Thu, 29 Jun 2023 15:02:14 +0200 Subject: [PATCH] print agentfile also for no given identity --- bin/startagent | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/startagent b/bin/startagent index 37c014f..300ed59 100755 --- a/bin/startagent +++ b/bin/startagent @@ -194,12 +194,10 @@ $(ssh_runinagent $agentfile ssh-add -l)" ret=0 else logwarning "ssh-identity »$ssh_identity« is not configured. Please create $identitydir and add keys" - echo $agentfile + printf "%s" "$agentfile" ret=2 fi - else - if which gnome-keyring-daemon >/dev/null 2>&1; then logdebug "no identity given -> gnome-keyrings ssh-agent" agentfile="${SSH_AGENTS_DIR}/agent-gnome_session-$(hostname)" @@ -209,12 +207,12 @@ $(ssh_runinagent $agentfile ssh-add -l)" logdebug "ssh-agent for identity »$ssh_identity«: $agentfile" # logdebug "currently loaded keys after action: #$(ssh_runinagent $agentfile ssh-add -l)" + printf "%s" "$agentfile" ret=0 else logwarning "no identity given -> exit" ret=1 fi - fi [ $DISPLAY_ORIG ] && logtrace "reset DISPLAY=$DISPLAY_ORIG" @@ -373,7 +371,8 @@ function check_pubkeysonly () { ssh_runinagent () { - + local SSH_AUTH_SOCK + local SSH_AGENT_PID local agentfile local command local agentfile=${1}