]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Only say "bye, bye" if this seems to be the "top" session
authorAlexander Barton <alex@barton.de>
Mon, 24 Aug 2009 19:36:42 +0000 (21:36 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 24 Aug 2009 19:36:42 +0000 (21:36 +0200)
Don't say "bye, bye" if the shell session has been invoked by sudo(8).

user/bash_logout

index ea57bae07c7a33b4d36fa65ad08cbe43e0f56d62..deaa629dc2c3b90692de93abd5734332e1b3ed4c 100644 (file)
@@ -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-