The Berkeley Syslog Suite - Written by the good folks at UCB.
Ported to the AT&T 3B2 computer 30Nov92 by Jeffrey L. Bromberger
----------------------------------------------------------------

Background information and sources:
-----------------------------------
These files make up the 4.3 Reno (and maybe 4.4?) BSD syslog facility.
They were ftp'd from uunet in November 1992.  Almost all the files
are originally from UCB, and therefore retain the copyright of the
Regents of the University of California.  I have made no further
copyright restrictions on these files.  PLEASE MAKE SURE THAT YOU READ
THE COPYRIGHT MESSAGE FOUND IN EACH SOURCE FILE!

Supported software:
-------------------
This port is designed for the AT&T 3B2 series computer with the
Wollongong TCP/IP software package.  I have personally tested it on
3B2/310's and 3B2/400's running SVR3.1.2 with TCP software version
3.0.1.  If you have any problems with this distribution, please email
me (see address below).

I believe that I have made my changes so general to System V, that
this package *may* work on darn near anything that has a complete
socket library.  Guaranteed not to work on the 3B1/Unix-PC.  Use
Andy Poling's 3B1 implementation instead.  Because the socket
library on the 3B2 has most of the "useful" BSD routines, I have left
all calls to things like setsigmask(), etc...

Compilation:
------------
Just type make all.  That will create two executables, syslogd and
logger.  syslogd is the system logger program.  It must be operational
before any logging will work.  logger is a "user end interface" for
the logging procedure.  This allows you to insert notes into log files
from shell scripts.  The file syslog.o contains the library routines
needed to include logging in your programs.  It's needed for things
like NNTP, sendmail, and other nice BSD things :-) WARNING: If your
version of Unix already uses a file called /dev/log, then you have
to edit syslog.h to reflect this.  You need a name that isn't being
used - maybe try /dev/syslog.  This is the name I have seen in some
SVR3/BSD hybrid systems (like the MIPS RISC/OS).

Installation and testing:
-------------------------
Before installation, you have to edit a couple of local files.  First,
edit the file /etc/services.  Make sure that it has a line like this
in it:

syslog		514/udp

Next, you will need a syslog.conf file.  By typing "make install", a
generic (read: pretty much useless) one will be created for you.  It
serves basically as an example of how to create one, as well as a
basis to allow the syslog daemon to be tested.  Once you are happy
that it passes the tests, it's up to you to fix this file the way you
want it.  More than likely, you will rarely ever want the syslog daemon to
send messages to your screen, so be conservative.  Many programs expect
certain files to be in specific (that is, traditional) places.  Don't
mess around with the sendmail and general logs if you don't have to.
One thing to keep in mind: there will never be kern.* messages.  The
SysV kernel doesn't give a hoot about syslog logging (at least in SVR3.1)
and there is no easy way to make it use this interface.  If anyone out
there knows a safe and simple way to use those NOTICE: and WARNING:
messages that come to /dev/console, let me know!  I have been told
that there is a /dev/log interface in SVR3.2; it seems that you'd have
to kill off the standard error logging daemon to have this syslog
daemon read from that device.  Oh well...

Finally, type make install.  This will put syslogd and logger in
reasonable places, as well as install the header files (so that you
can use the syslog routines yourself), config file, and man pages.  It
is to your advantage that you check the Makefile **BEFORE** you make
install anything.  'Nuff said.

For basic testing, type make test.  The usock program sends a message to
the unix domain socket of the syslogd.  This is the main way that the
syslogd gets it's info from your local host.  If this doesn't work, you're
in deep trouble.  The isock program sends a message to the internet domain
socket of the syslogd.  This is how the daemon keeps abreast of other
machines' problems - the @ character in the config file uses this.

If these tests work, you can try using logger.  Make sure to specify a
log priority that will end up someplace visible (like auth.notice - if
you keep the setup in the distributed config file).  If you really
want to put the logger through a heavy test, use the shell script
log_all.sh.  This will send a message at every log level to the daemon
(using logger).

The final part of installation involves putting the syslog.o file
someplace accessible.  I personally made myself a libbsd.a, into which
I'm putting my own BSD routines.  Eventually, I'm going to pare
libnet.a (the Wollongong BSDish socket library) down to only the
actual socket stuff, and take out all the rest.  Some folks might just
want to append syslog.o to libnet.a.  Others choose to put this all by
itself into libsyslog.a.  It's your call - just don't forget where you
put it!

Automatic startup upon rebooting:
---------------------------------
In order to have the syslog daemon start upon booting your machine,
you have to start it in the S86win3b file.  You must start it early
so that it is running before any other application that uses syslog
is started.  If this isn't done, then any initial messages may be lost
(or your program may fail when syslog cannot access /dev/log).  I put
it after the ifconfig lines, but before the nameserver (since named
uses syslog).  Towards the end of this file (in the "stop" portion,
you should also stop the syslog daemon the correct way, by sending it
a "kill -15".  The easiest way to do this is as follows.  Add a line
to the S86win3b file like this:

kill -15 `cat /etc/syslog.pid`

Put this after the other daemons are killed, but before you kill
inetinit.

Comments and bug reports:
-------------------------
If you have comments or find bugs in the code, tell me!  If you
develop patches to add functionality, please follow this simple rule:
enclose it in #ifdef u3b2/#endif pairs.  The guts of these programs
are pure BSD.  The only changes I have made are #ifdef'd like this.  By
sticking to this method, it should be relatively simple to keep the
syslog package up to date.


Jeffrey L. Bromberger ------- System Manager ------- Tramway Unix Systems
jeffrey@squid.tram.com        Anywhere!{ccnysci,limbic,icus}!tram!jeffrey
