pppoa.sh 546 B

12345678910111213141516171819202122232425262728
  1. scan_pppoa() {
  2. scan_ppp "$@"
  3. }
  4. setup_interface_pppoa() {
  5. local iface="$1"
  6. local config="$2"
  7. config_get device "$config" device
  8. config_get vpi "$config" vpi
  9. config_get vci "$config" vci
  10. for module in slhc ppp_generic pppoatm; do
  11. /sbin/insmod $module 2>&- >&-
  12. done
  13. config_get encaps "$config" encaps
  14. case "$encaps" in
  15. 1|vc) ENCAPS="vc-encaps" ;;
  16. *) ENCAPS="llc-encaps" ;;
  17. esac
  18. config_get mtu "$config" mtu
  19. mtu=${mtu:-1500}
  20. start_pppd "$config" \
  21. plugin pppoatm.so ${vpi:-8}.${vci:-35} ${ENCAPS} \
  22. mtu $mtu mru $mtu
  23. }