PROGRAM NAME:  motd

AUTHOR:  Jim Besemedr

DATE WRITTEN:  6 aug 76

SOURCE LANGUAGE:  C

LOCATION OF SOURCE:  /usr/source/s2

LOCATION OF BINARY:  /usr/bin

SYNTAX:
% motd		(no args)

DESCRIPTION:
Motd is a program which shows users new portions of a
running message of the day.  It enables a file to be
updated whenever new messages appear, and ensures that
each user sees the message at least once.  It remembers
what portions of the message file each user has seen, and
only shows each user new information in the file.

MESSAGES & DIAGNOSTICS:
No messages or errors.  It prints the /etc/motd file, then
prints any unseen portion of the banner file, and then exits.
If it is interrupted or bombs out, it will pick up where it
left off next time it is run.  (Nothing is lost.)

SEE ALSO:
login(I)

FILES USED:
/usr/news/banner:	accumulated banner message file -- only new parts shown
/etc/banner-log:	log of user's positions in banner file
/etc/motd:		special message file--displayed at each login
(these file names easily changed in motd.c)

IMPLEMENTATION DESCRIPTION:
This program is intended to be exec'ed by a slightly modified
"login" program.  Ours has only minor modifications, to whit:
the section of code which previously output the message of the
day has been replaced by a fork/exec thing to run /usr/bin/motd.
Motd then runs with interrupts enabled, so that messages can
be postponed by an interrupt.  People can run "motd" as a normal
command, and it will work just as if evoked by login.
