ref: caddc9a6ea0c8aeb2510ec9eda67eb4f2e82a00c
parent: d5bbee50a019aaa91f16ab115f606739e837cb9c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Aug 4 10:18:40 EDT 2017
inst: get rid of ppp configuration
--- a/rc/bin/inst/confignet
+++ b/rc/bin/inst/confignet
@@ -9,7 +9,7 @@
export confignet
exit
}
- if(~ $netisfrom ppp ether){
+ if(~ $netisfrom ether){
x=config$netisfrom
$x=done
./config$netisfrom checkdone
@@ -22,48 +22,18 @@
exit
case go
- devs=''
- if(test -d /net/ether0 >[2]/dev/null)
- devs=$devs^ether
- if(test -f /dev/eia? >[2]/dev/null)
- devs=$devs^ppp
-
- switch($devs){
- case ''
+ if(! test -d /net/ether0 >[2]/dev/null){
echo
- echo 'Could not find ethernet card nor serial port nor modem.'
+ echo 'Could not find ethernet card.'
echo
netisfrom=none
-
- case ppp
- echo
- echo 'No ethernet card was detected, but there is a serial port or modem.'
- echo 'We will configure PPP.'
- echo
- netisfrom=ppp
-
- case ether
- echo
- echo 'No serial port or modem detected, but there is an ethernet card.'
- echo 'We will configure the ethernet.'
- echo
- netisfrom=ether
-
- case etherppp
- echo
- echo 'You can connect to the internet via'
- echo 'a local ethernet or a dial-up PPP connection.'
- echo
- prompt -d ether 'Interface to use' ether ppp
- netisfrom=$rd
+ export netisfrom
+ exit
}
-
+ echo
+ echo 'We will configure the ethernet.'
+ echo
+ netisfrom=ether
export netisfrom
- if(~ $netisfrom ether ppp)
- exec ./config$netisfrom go
-
- if(! test -f /srv/cs && ! test -f /net/cs)
- ndb/cs
- if(! test -f /srv/dns && ! test -f /net/dns)
- ndb/dns -r
+ exec ./configether go
}
--- a/rc/bin/inst/configppp
+++ /dev/null
@@ -1,63 +1,0 @@
-#!/bin/rc
-
-# desc: configure your internet connection via ppp over a modem
-
-switch($1) {
-case go
- devs=`{ls -p /dev/eia? >[2]/dev/null}
- if(~ $#devs 0) {
- echo 'No serial port found; this can''t happen.' # because confignet checks
- exit
- }
-
- # not going to use the mouse for PPP
- if(~ eia^$mouseport $devs)
- devs=`{echo $devs | sed 's/eia'^$mouseport^'//'}
-
- if(~ $#devs 0) {
- echo 'The only serial port you have is your mouse.'
- echo 'Cannot configure PPP.'
- exit
- }
-
- echo
- echo 'Please choose the serial port or modem to use to connect to your ISP.'
- echo
- for(i in $devs) {
- n=`{echo $i | sed 's/eia//'}
- n=`{hoc -e 1+$n}
- echo ' '^$i^'(Windows'' COM'^$n^')'
- }
- echo
- prompt 'Serial device' $devs
- pppdev=$rd
-
- echo
- echo 'Pick a baud rate for the PPP connection.'
- echo
- prompt -d 115200 'Baud rate'
- pppbaud=$rd
-
- echo
- echo 'You can specify your dialup phone number, username, and password,'
- echo 'or you can log in manually by typing the modem commands yourself.'
- echo
- prompt 'Dialing method' auto manual
- pppmethod=$rd
-
- switch($pppmethod){
- case auto
- prompt 'PPP phone number'; pppphone=$rd
- prompt 'PPP phone username'; pppuser=$rd
- prompt 'PPP phone password'; ppppasswd=$rd
- }
-
- export pppdev pppmethod pppphone ppppasswd pppuser pppbaud
- exec ./startppp go
-
-case checkdone
- if(! ~ $#pppmethod 1 || ! test -f /dev/$pppdev){
- configppp=notdone
- export configppp
- }
-}
--- a/rc/bin/inst/startppp
+++ /dev/null
@@ -1,30 +1,0 @@
-#!/bin/rc
-
-# desc: activate ppp connection
-# prereq: configppp
-
-switch($1) {
-case checkready checkdone
- if (isipdevup '^pkt[0-9]')
- startppp=done
- export startppp
-
-case go
- if(isipdevup '^pkt[0-9]')
- exit
-
- ctl=$pppdev^ctl
- echo b115200 >$ctl
-
- switch($pppmethod) {
- case manual
- echo
- echo 'Please dial the modem, and type ctl-d when PPP has started.'
- echo 'You may need to type ctl-m to send modem commands.'
- echo
- ip/ppp -f -u -b b^$pppbaud -p /dev/^$pppdev
-
- case auto
- ip/ppp -f -b b^$pppbaud -p /dev/^$pppdev -s $"pppuser:$"ppppasswd -t 'atdt'^$"pppphone
- }
-}