Forcing actions at login

Brandon S. Allbery KB8JRR allbery at NCoast.ORG
Fri Jan 18 10:37:58 AEST 1991


As quoted from <1991 at necisa.ho.necisa.oz.au> by boyd at necisa.ho.necisa.oz.au (Boyd Roberts):
+---------------
| In article <1991Jan13.231048.25341 at NCoast.ORG> allbery at ncoast.ORG (Brandon S. Allbery KB8JRR) writes:
| >if test ! -f $HOME/.hushlogin; then
| >    if newer-than /etc/motd $HOME/.enoughalready; then
| >	cat /etc/motd
| >	touch $HOME/.enoughalready
| >    fi
| >fi
| 
| But Brandon, where's the test on:
|     "$HOME/.i-really-don't-want-to-see-the-motd-ever!"
+---------------

Xenix, remember.  In any case, that's .hushlogin.  ;-)

.enoughalready was added after the owner of ncoast put a 3-page ad in
/etc/motd and everyone had to read it every time they logged in for a week.
It was actually a quick hack; I added "newer-than" afterward.

BTW, there *is* a bug in the above: I didn't test for the existence of
.enoughalready, so it spits out a spurious error message the first time anyone
logs in.  The actual code in use here is a bit more bizarre, as there are
*three* /etc/motd files (/etc/motd, /etc/motd.real, /etc/motd.motd; don't
ask me why Rich did this) with different levels of blocking for them.

++Brandon
-- 
Me: Brandon S. Allbery			    VHF/UHF: KB8JRR on 220, 2m, 440
Internet: allbery at NCoast.ORG		    Packet: KB8JRR @ WA8BXN
America OnLine: KB8JRR			    AMPR: KB8JRR.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery    Delphi: ALLBERY



More information about the Comp.unix.admin mailing list