]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/startppp
fix manual (book) build, add files/permissions for lp, compile postscript
[plan9front.git] / rc / bin / inst / startppp
1 #!/bin/rc
2
3 # desc: activate ppp connection
4 # prereq: configppp
5
6 switch($1) {
7 case checkready checkdone
8         if (isipdevup '^pkt[0-9]')
9                 startppp=done
10         export startppp
11
12 case go
13         if(isipdevup '^pkt[0-9]')
14                 exit
15
16         ctl=$pppdev^ctl
17         echo b115200 >$ctl
18
19         switch($pppmethod) {
20         case manual
21                 echo 
22                 echo 'Please dial the modem, and type ctl-d when PPP has started.'
23                 echo 'You may need to type ctl-m to send modem commands.'
24                 echo
25                 ip/ppp -f -u -b b^$pppbaud -p /dev/^$pppdev
26
27         case auto
28                 ip/ppp -f -b b^$pppbaud -p /dev/^$pppdev -s $"pppuser:$"ppppasswd -t 'atdt'^$"pppphone
29         }
30 }