1#!/bin/rc 2 3switch($1) { 4case go 5 6 devs='' 7 if(test -d '#l/ether0' >[2]/dev/null) 8 devs=$devs^ether 9 if(test -f '#t'/eia? >[2]/dev/null) 10 devs=$devs^ppp 11 12 switch($devs){ 13 case '' 14 echo 15 echo 'Could not find ethernet card nor serial port nor modem.' 16 echo 'Please use a local copy of the distribution archive.' 17 echo 18 ifc=none 19 20 case ppp 21 echo 22 echo 'No ethernet card was detected, but there is a serial port or modem.' 23 echo 'We will configure PPP.' 24 echo 25 ifc=ppp 26 27 case ether 28 echo 29 echo 'No serial port or modem detected, but there is an ethernet card.' 30 echo 'We will configure the ethernet.' 31 echo 32 ifc=ether 33 34 case etherppp 35 echo 36 echo 'You can connect to the internet via' 37 echo 'a local ethernet or a dial-up PPP connection.' 38 echo 39 prompt 'Interface to use' ether ppp 40 ifc=$rd 41 } 42 43 ipinterface=$ifc 44 export ipinterface 45 46 switch($ifc) { 47 case ether 48 exec configether go 49 case ppp 50 exec configppp go 51 } 52 53case checkdone 54 if(~ $#ipinterface 1) 55 switch($ipinterface) { 56 case ether 57 exec configether checkdone 58 case ppp 59 exec configppp checkdone 60 } 61 configarch=notdone 62 export configarch 63 64} 65