]> arthur.barton.de Git - ConfigScripts.git/blobdiff - user/bash_logout
Make check for "interactive shells" more robust
[ConfigScripts.git] / user / bash_logout
index b2e4f093297329ef44bafa78ffe2761572cd2ae5..8265c8d4370f16217105c69c9429921fab2d1d28 100644 (file)
 # individual ~/bash_logout.user file!
 #
 
-[ -e ~/.ConfigScripts.debug ] && echo " >> ~/.bash_logout ..."
+[ -e ~/.ConfigScripts.debug ] && echo " .. ~/.bash_logout ..."
 
 [ -r ~/.bash_logout.user ] && source ~/.bash_logout.user
 
-# Clean up SSH agents, if running
-[ $SSH_AGENT_PID ] && eval `ssh-agent -k`
+[ -e ~/.ConfigScripts.debug ] && echo " >> ~/.bash_logout ..."
+
+# Clean up SSH agents, if running and not using keychain(1)
+if [ $SSH_AGENT_PID ]; then
+       type -t keychain >/dev/null || eval `ssh-agent -k`
+fi
 
 # Clear the console if it is a local terminal
 case `tty` in