
	     Here are the installation instructions for callback.
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduction
------------

The full documentation is in a separate distribution on ftp.icce.rug.nl,
directory /pub/http, callback.{ps,txt}.gz. 

On http://www.icce.rug.nl/docs/programs/callback/callback.html the docs are
available on the WWW on-line.

Questions, comment can be sent by e-mail to: frank@icce.rug.nl

However, there are man-pages in the distribution, in the subdirectory man/
They can be installed (as root) in /var/man/cat{1,4} by doing 'build man'.

Preliminary
-----------

    0.  Callback version 3.00 and above assumes mgetty as the program 
        listening to the modemline. The file mgetty-HOWTO describes in a 
        nutshell what switching from getty-ps to mgetty involves. 

	Beyond it is assumed that mgetty is installed on your system.

How to compile the software.
----------------------------

    0. This section only defines how to compile and install the binaries.
       Using the programs is described in callback.doc.


    1. unpack callback-X.YY.tgz:

	    tar xzvf callback-X.YY.tgz

	This will create a directory callback, un which the software can be
	found


    2. cd callback

	All instructions are relative to this directory, unless explicitly
	mentioned otherwise.
	
    3.  The installation script 'build' assumes that you have icmake installed
	on your system. Icmake are found in ftp.icce.rug.nl, /pub/unix
	From now on it is assumed that you have icmake available.

    4. All compile-time definitions are found in the file 'configure.h'
        If any define doesn't suit you, change them to values more 
	appropriate to your system, and rebuild the software, by doing
        'build progs'.

    5.	Give the command

	    build progs

	to build the programs.

	The compilation of parser.tab.c will cause some warnings, as does the
	compilation of lexer.c. The warnings can safely be ignored.


    6.	Continue with the next section: Instructions on how to install
	callback. 


Instructions on how to install callback
---------------------------------------

    0.  Either you agree with the predefined paths, or you have recompiled the
	software yourself. In any case: the binaries are now assumed present in
	cb/, login/ and mgetty/.


    1. become root


    2. make a directory /conf/callback (or make your BASE_PATH, if you
	changed the default in configure.h), accessible for root only.


    3.	If callback is used in the dial-in mode, it can be used to control
	your modem. If callback is used in the callback mode it can also 
	be used to perform callbacks.

	If you want to use callback in the dial-in mode, do:

		build install dialin
		cp examples/dialin.setup /etc/callback.setup

	Otherwise, you want to use callback in the callback mode. Then do:

		build install callback
		cp examples/callback.setup /etc/callback.setup

	NOTE: /etc/callback.setup may be another file or in another location
		if you altered the default settings in configure.h.


    4.	Create a symlink from your path to the /conf/callback/cb program, e.g.,

	    ln -s /conf/callback/cb /sbin/cb


    5.  When using the tcsh, do: rehash.


    6. Copy ttyS? files from the directory examples/ to /conf/callback,
       e.g.:

	cp *.ttyS2 /conf/callback


    7. If you use modemline ttyS1 and/or ttyS3, change the extensions of the
	*.ttyS2 files so as to reflect your (extra) modemline(s). If you use
	multiple modem lines, make sure you have a set of files for each
	modemline, e.g.,
	    *.ttyS1 if you use modemline ttyS1,
	    *.ttyS2 if you use modemline ttyS2,
	    *.ttyS3 if you use modemline ttyS3.


    8. Make a symbolic link for each modemline you're using to the mgetty
	program used to listen to the modem(s). E.g., do

	    ln -s /usr/local/sbin/mgetty /sbin/modem.ttyS2


    9. Adapt inittab to reflect the situation at your system,
       see the inittab example in the examples/ subdirectory,
       read the callback docs for more information. An example of 
       a inittab specification used with callback is:
       
       s1:34:respawn:/conf/callback/cbmgetty ttyS1

   10. Edit /etc/callback.setup to suit your system and callbackmode,


   11. Do
	    chmod 600 /etc/callback.setup


   12. Make sure that the program called in mgetty's login.config file is
        cblogin, if you're intending to use callback in the callback mode.
        I.e., login.config should contain a line like

        *       -       -       /conf/callback/cblogin @

        
   13. Do
	    'cb init'

	to restart init. This loads the enable-files. The modem.ttyS?
	processes should appear in your ps-list. They should go to sleep
	shortly thereafter. 

    14. Done.

	Use cb to control your modem. If you used 'mode: calback', you
	should be able to accept callback-requests from selected users,
	as defined in your callback.setup file.

	Also, make sure that the registersetings of your modem is ok.
        Again, read the documentation. Mgetty's docs are also very 
	useful to read.
