allow the user to override the underlying connection method when using pptp (defaults...
[openwrt/svn-archive/archive.git] / package / pptp / files / pptp.sh
1 scan_pptp() {
2 scan_ppp "$@"
3 }
4
5 setup_interface_pptp() {
6 local iface="$1"
7 local config="$2"
8
9 config_get device "$config" device
10 config_get ipproto "$config" ipproto
11
12 for module in slhc ppp_generic ppp_async ip_gre; do
13 /sbin/insmod $module 2>&- >&-
14 done
15 setup_interface "$iface" "$config" "${ipproto:-dhcp}"
16
17 config_get mtu "$cfg" mtu
18 config_get server "$cfg" server
19 mtu=${mtu:-1452}
20 start_pppd "$config" \
21 pty "/usr/sbin/pptp $server --loglevel 0 --nolaunchpppd" \
22 file /etc/ppp/options.pptp \
23 mtu $mtu mru $mtu
24 }