From: Oleg Broytman Date: Sun, 4 Oct 2015 18:55:20 +0000 (+0300) Subject: Add .hushlogin, show /etc/motd in .profile if it was changed X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=f2763b86760c3b58c1665b0476730aa4db80d858 Add .hushlogin, show /etc/motd in .profile if it was changed --- diff --git a/.hushlogin b/.hushlogin new file mode 100644 index 0000000..bff8a51 --- /dev/null +++ b/.hushlogin @@ -0,0 +1,4 @@ +# The mere presence of this file in the home directory disables the system +# copyright notice, the date and time of the last login, the message of the +# day as well as other information that may otherwise appear on login. +# See `man login`. diff --git a/.profile b/.profile index 38212bc..370bb75 100644 --- a/.profile +++ b/.profile @@ -177,6 +177,10 @@ if [ -t 0 ] ; then export HGUSER unset name email + + if test -f .hushlogin && ! cmp -s .motd /etc/motd; then + tee $HOME/.motd < /etc/motd + fi fi # No need to set DISPLAY - ssh sets DISPLAY and calls xauth