#!/bin/tcsh -f
#
# SLIPIN_MASON

cd /etc/slip

# ifconfig and other networking executables must be in the path,
# modify if they are somewhere else.
#

set path = ( /etc /bin /usr/bin /usr/local/bin )

set if_addr     = "192.100.11.69"
set if_dstaddr   = "192.100.11.0"
set if_broadcast = "192.100.11.255"
set if_netmask  = "255.255.255.0"

# LOGIN runs this script without arguments.  allocslip then runs the
# script with 'begin' to begin and 'end' to end.
#

if ( $1 == "" ) then
    exec bin/allocslip -t 0 "dialin/slipin_shuttle begin" "dialin/slipin_shuttle end"
endif

# ALLOCSLIP runs this script "slipin_mason begin <interface>"
#

if ( $1 == "begin" ) then
    set interface = $2
    echo "BEGIN $interface"
    ifconfig $interface $if_addr
    ifconfig $interface broadcast $if_broadcast netmask $if_netmask
    ifconfig $interface up
    route add -net $if_dstaddr gw $if_addr
endif

# ALLOCSLIP runs this script "slipin_mason end <interface>"
#

if ( $1 == "end" ) then
    set interface = $2
    echo "END $interface"
    ifconfig $interface down
endif

