Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!mcs.kent.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.unix.admin Subject: Re: Forcing actions at login Message-ID: <1991Jan17.233758.27170@NCoast.ORG> Date: 17 Jan 91 23:37:58 GMT References: <1991Jan10.191546.268@am.sublink.org> <1991Jan13.231048.25341@NCoast.ORG> <1991@necisa.ho.necisa.oz.au> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.unix.admin Organization: North Coast Computer Resources (ncoast) Lines: 32 As quoted from <1991@necisa.ho.necisa.oz.au> by boyd@necisa.ho.necisa.oz.au (Boyd Roberts): +--------------- | In article <1991Jan13.231048.25341@NCoast.ORG> allbery@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@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