From: Alexander Barton Date: Mon, 24 Aug 2009 19:36:42 +0000 (+0200) Subject: Only say "bye, bye" if this seems to be the "top" session X-Git-Url: https://arthur.barton.de/gitweb/?p=ConfigScripts.git;a=commitdiff_plain;h=480a289602f8a7bf8a599ca35d66851c3d8ff33a Only say "bye, bye" if this seems to be the "top" session Don't say "bye, bye" if the shell session has been invoked by sudo(8). --- diff --git a/user/bash_logout b/user/bash_logout index ea57bae..deaa629 100644 --- a/user/bash_logout +++ b/user/bash_logout @@ -23,7 +23,9 @@ case `tty` in [ -x /usr/bin/clear_console ] && /usr/bin/clear_console --quiet || clear ;; *) - echo "Bye, bye, $USER!"; echo + if [ -z "$SUDO_USER" ]; then + echo "Bye, bye, $USER!"; echo + fi esac # -eof-