startppp 577 B

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