There will be a number of thing that you will either have to tweek in this code depending on what you're connecting to. Listed below are the things you should need to change. I've connected to three modem pools, and each one of them required different parameters.
force="no"
mach="lucky"
The mach variable is the machine name (from /etc/uucp/Systems entry) that
you want to connect to.
domain="acns|ais"
Every connection will have something distinctive in the netstat output,
for instance when I connect to acns.nwu.edu, netstat will always show acns
as part of the connections I make. Set this to something reliable.
success_string="Your IP address"
Set the success_string variable to something(s) that you get when the
connection get's made correctly, and it can continue processing.
failure_string="NO CARRIER"
Set the failure_stringvariable to something(s) that you get when the
connection didn't work, for example busy signals, incorrect password
verification, etc...
default_route="129.105.9.0"
Set this to the route you should use. For instance, when I connect to
129.105.9.XXX, I always have to route via 129.105.9.0 anyway. Go fig.
netmask="255.255.255.0"
Set this to the appropriate netmask.
blip_blurb="/usr/local/lib/blip.blurb"
Set this to wherever you want the little blip blurb.
Reasons for this file:
/usr/etc/slip -dd -cp cslip -m $netmask -u $mach &Remove the -c if you don't want it to redial if it loses the connection.
node=`egrep "Your IP address" /tmp/slip.out | awk -F. '{ print $5 }'` /usr/etc/ifconfig sl0 129.105.9.$node netmask $netmaskWhen entering slip mode, the modem pool echoes "Your IP address is 129.105.9.XXX" so I grep this last number (the only one that isn't constant) and use this in the ifconfig'ing. If your server has a wider range of IP addresses, you will have to modify these two lines further.
remove=`netstat -r | grep default | awk '{print $1 " " $2}'` /usr/etc/route delete $remove /usr/etc/route add net default $default_route 1These three lines aren't necessary if you only connect to the same place, but occasionally I do connect elsewhere, and this insures that the route is made each time.
This is a good place to include anything additional that you want run at connection time.