This document describes a hack to run IRIX SLIP with server assigned IP addresses. I've recieved more than one, and I'm presenting them in the order I find out about them. The order says nothing about which one I prefer (since I haven't tested any of them).
#!/bin/sh ## Script to start slip. Handles dynamic ip allocation. ## Stefan FarestamStefan may have improved his script since he last sent it to me. If you have problems with this one, he might have an improved script.Mars 1995 ## ## Usage (to initiate): slipc uucp-name ## (to terminate): slipc quit ## Remote ip address. If this is the same as the local address, then ## set it to 0 (this is tested for further down) remote_ip=130.237.224.40 trap "$0 quit" 2 syslog=/usr/adm/SYSLOG case "$1" in down|stop|kill|end|quit|e|q|s) /etc/killall -INT slip ;; *) if uuname | egrep -s \^${1:-####}$ ; then slip -dd -u "$1" -r $remote_ip -o 1>/dev/null 2>&1 & n=`sed -n '$=' $syslog` ## You may have to change this expression, since it has ## to match whatever the slip you connect to outputs. match="slip\[$!\]:[ 0-9.:]* start" echo "Waiting for slip to connect\c" while sleep 5; do if sed 1,${n}d $syslog|egrep -s "$match" ; then ## You may have to change the sed expressions. The ## important thing is to extract the assigned ip no. local_ip=`sed 1,${n}d $syslog |\ fgrep "slip[$!]"|\ sed -n 's/^.*address is \([0-9."]*\).*$/\1/p'|\ sed 's/^[":.]*//' |\ sed 's/[":.]*$//'` if [ $remote_ip = 0 ]; then remote_ip=$local_ip; fi ifconfig sl0 $local_ip $remote_ip echo "\n\007Connection established" route add net default $remote_ip 1 1>/dev/null ## Decrease the debugging level two steps kill -USR2 $!; sleep 1 kill -USR2 $! break elif ps -p $! 1>/dev/null; then echo ".\c" else echo "\n\007Error:" fgrep "slip[$!]: " $syslog break fi done else echo No entry for system \"$1\" in the UUCP Systems file exit 1 fi ;; esac
Looking more closely at the script, you may need to specify additional options to the SLIP startup command. For example, to use the CSLIP version of the protocol, you would add -p cslip to the command options.
Brian says:
I welcome and encourage any comments you have. But like I said -- it's just a hack to save some time, and make it easier for others who want to use my machine.