]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Update copyright notice and file information text
authorAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 21:50:58 +0000 (22:50 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 23 Mar 2009 21:50:58 +0000 (22:50 +0100)
user/bash_logout

index ce8846a173bdfd95d712c03684017cbd018ef6b9..ea57bae07c7a33b4d36fa65ad08cbe43e0f56d62 100644 (file)
@@ -2,17 +2,27 @@
 # ~/.bash_logout: executed by bash(1) on logout
 # Written 2003-2009 by Alexander Barton (alex@barton.de)
 #
+# This script is executed by bash(1) on logout.
+#
+# PLEASE NOTE:
+# To make this script generic, it sources ~/bash_logout.user if it exists.
+# So you shouldn't make changes to this script, but create your own
+# individual ~/bash_logout.user file!
+#
+
+[ -e ~/.ConfigScripts.debug ] && echo " >> ~/.bash_logout ..."
 
-[ -e /tmp/ConfigDebug.$USER ] && echo " >> ~/.bash_logout ..."
+[ -r ~/.bash_logout.user ] && source ~/.bash_logout.user
 
-# clean up SSH agents
+# Clean up SSH agents, if running
 [ $SSH_AGENT_PID ] && eval `ssh-agent -k`
 
+# Clear console, it it is local terminal
 case `tty` in
-/dev/tty[0-9]*)
+    /dev/tty[0-9]*|/dev/ttyS[0-9]*)
        [ -x /usr/bin/clear_console ] && /usr/bin/clear_console --quiet || clear
        ;;
-*)
+    *)
        echo "Bye, bye, $USER!"; echo
 esac