
				INSTALL 1.00

    Installation is reasonably straight forward.  I suggest you unpack the
    stuff into /tmp and then copy it to /etc.  This will avoid the possibility
    of overwriting something important in /etc if you unpack the archive 
    incorrectly.

    --- DO ALL INSTALLATION AS ROOT ---

    cd /tmp
    tar xvf dslip100.tar
    mkdir /etc/slip
    cp /tmp/slip/* /etc/slip
    rm -rf /tmp/slip

    You must have a reasonable amount of knowledge about networking, rc
    scripts, and whatnot.  Read rc.local and rc.net and modify your
    /etc/rc.local and rc.net accordingly.

    Next, modify /etc/slip/rc.slip .. note that /etc/rc.net executes
    /etc/slip/rc.slip directly, there is NO /etc/rc.slip !!  The rc.slip
    example assumes the slip stuff is in the directory /etc/slip.  The rc.slip
    script starts up three independant slip connections, if you only have
    one slip interface you should comment out the 'notty' lines for the other
    two.  

    Note that several independant slip interfaces can run over the same tty,
    but only one may be active at a time in that case.  The existance of a 
    file 'disableN', e.g. 'disable0', 'disable1', and/or 'disable2' will
    disable a script running in the background until removed, and this is the
    primary means we use to control slip multiple interfaces that run on the
    same tty.

    Interface 0 (slip0.cfg) demonstrates a full time hardwired slip interface.
    You should ensure that proper cabling is used so that the CD line is 
    asserted while the cable is plugged in.

    Interface 1 (slip1.cfg and slip1.xp) demonstrates a dialup / login sequence
    using EXPECT.

    Interface 2 (slip2.cfg and slip2.xp) demonstrates a simplified dialup
    sequence using EXPECT (no login)

    Most of the scripts assume /bin/tcsh

    The expect scripts (*.xp) assume /etc/slip/expect but if you want to
    install expect for real you should probably stick it in /usr/local/bin

    NOTE: bash version 1.12.1 and older appear to have a bug that makes it
    impossible to run long standing loops with it due to a memory leak.  I
    am using tcsh for my 'doslip' script.



    			ONCE THE DOSLIP SCRIPTS ARE RUNNING

    You can disconnect or disable a connection (for example, connection 0)
    with:

        touch disable0

    You can restart a connection with 'touch restart0'.  The script will
    remove the file after it restarts itself.  This is useful when 
    experimenting with scripts but I've had problems with it just killing
    the existing process without starting a new one.

    'touch kill0' will disconnect and kill the script, removing the file
    before it dies.

    'touch pause0' will pause the script, causing it to basically freeze 
    until you remove the file.

    The *.cfg files configure the doslip script for a particular setup.  You
    should attempt to keep the doslip script as general as possible and put
    the special cases in the *.cfg file(s) instead of specializing doslip.



				HOW IT WORKS

    doslip runs the appropriate configuration script and then loops in a state
    machine.  When waiting for something the loop polls various files and
    conditions once every 10 seconds.  If no 'disableN' file exists doslip
    attempts to connect to the specified interface by running the dudiscdev
    program.  The dudiscdev program will fork itself and run the appropriate
    ioctls as well as execute an optional command (usually expect) to do the
    actual dialout and connect.  If this program exits with code 2 dudiscdev
    assumes the connection succeeded and proceeds to attach a slip interface
    to the tty.  dudiscdev then modifies its argv[] array such that the 
    doslip script can pick up the interface name (sl0, sl1, etc...) that
    the slip device assigns the connection.  This interface name can be
    random and depends on the order that connections are made.

    dudiscdev remains running in the background monitoring CD.  When CD
    is lost dudiscdev disconnects the slip interface and exits.  The doslip
    script picks this up and will redial (unless the file pauseN or 
    disableN exists).

    Theoretically, dialing out is as simple as 'rm -f disable0' and 
    disconnecting manually as simple as 'touch disable0' in the /etc/slip
    directory.  In practice it will take time for you to get your configuration
    setup correctly.


				    EXPECT

    You do not necessarily need to use expect, but I suggest you at least try
    it out.  The manual page from the expect distribution is included along
    with the executable, but you really need the entire expect AND tcl 
    distributions if you intend to become a serious expect script writer :-).
    To show the manual page use:

    	nroff -man expect.man | less

    This stuff is provided as is.  You are expected to know the basics already,
    I do not have time to answer people's questions (not with 200 messages in
    my mailbox already from other things!).  This stuff is really for those
    hardcore slip users that need a more robust set of scripts for their 
    slip stuff.

    The newsgroup 'comp.lang.tcl' is dedicated to tcl and has a lot of
    expect stuff as well.

				LOG FILES, DAILY SCRIPT

    Assuming you have setup a cron you should run the 'daily' script once
    a day to keep log files a reasonable length.  You can manually monitor
    operations using tail -f, for example:

	cd /etc/slip
    	tail -f log0

    You can clear a log file using:

	cd /etc/slip
    	echo >log0

    Note that since doslip keeps an open descriptor to a log file, you should 
    NOT remove (rm) a log file under any circumstances or you will not be able
    to obtain any more logging information without also completely killing and 
    restarting (with notty) the doslip involved.

    						-Matt


    Matthew Dillon		dillon@moonshot.west.oic.com
    1005 Apollo Way		dillon@overload.berkeley.ca.us
    Incline Village, NV. 89451	ham: KC6LVW (no mail drop)
    USA 			Sandel-Avery Engineering (702)831-8000
    [always include a portion of the original email in any response!]

