home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.admin
- Path: sparky!uunet!gumby!ursa!ursa!mjr
- From: mjr@ursa.calvin.edu (Matt Ranney)
- Subject: Re: how to force readers to read a system message?
- Message-ID: <mjr.724807771@ursa>
- Sender: news@calvin.edu
- Organization: Calvin College
- References: <15DEC92.09272432@cc4.crl.aecl.ca>
- Date: Sat, 19 Dec 1992 23:29:31 GMT
- Lines: 51
-
- roihar@cc4.crl.aecl.ca writes:
-
- >Has anyone out there figured out how to do this yet??
- >I find that anything in /etc/motd is generally ignored by
- >at least 80% of our users. If we make them hit carriage return
- >or something similar after reading the message they generally
- >ignore the message and hit carriage return. Perhaps a quiz
- >on the contents of the message displayed? When will the system
- >be going down? Why is the system going down? Who is your Lord
- >and Master? What is your Bell Calling card number? etc...
- >Any ideas would be gratefully appreciated.
-
- Your quota will be reduced for each incorrect answer.
-
- Here is what I use to sorta deal with this problem. Most people know
- that if they put a .hushlogin file in their home directory that they
- won't see the motd. Also, just about everybody here uses tcsh as
- their login shell, so I added the followin lines to /etc/csh.login:
-
- --------------------------------------
- # If the user has ~/.hushlogin file, then they won't see the motd
- # automatically. Use ls -t to check which file is newer, and if
- # /etc/motd is newer, then print it out and reset the date on the
- # .hushlogin file. If the message is newer, print the info in a
- # way the the user will see it. (blinking + bold)
- #
- if ( -e $home/.hushlogin ) then
- set tim=`ls -t ~/.hushlogin /etc/motd`
- if ($tim[1] == "/etc/motd") then
- echotc -s mb
- echo --- NEW MOTD ---
- echotc -s me
- echotc -s so
- cat /etc/motd
- echotc -s se
- touch ~/.hushlogin
- else
- echo motd is unchanged.
- endif
- unset tim
- endif
- ---------------------------------
-
- I abhor csh programming, so there might be a cleaner way of doing
- this, but this works fine for me. Of course, if they don't have a
- .hushlogin file, it won't work, but you could always just go and GIVE
- everybody one, I guess.
- --
- Matt Ranney - mjr@calvin.edu
- "You know, I don't think theres a man, woman, or child alive today
- who doesn't enjoy a lovely beverage." -DL
-