From f2763b86760c3b58c1665b0476730aa4db80d858 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 4 Oct 2015 21:55:20 +0300 Subject: [PATCH] Add .hushlogin, show /etc/motd in .profile if it was changed --- .hushlogin | 4 ++++ .profile | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 .hushlogin 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 -- 2.39.5