5 setup_interface_pptp
() {
9 config_get device
"$config" device
10 config_get ipproto
"$config" ipproto
12 for module
in slhc ppp_generic ppp_async ip_gre
; do
13 /sbin
/insmod
$module 2>&- >&-
17 setup_interface
"$device" "$config" "${ipproto:-dhcp}"
20 config_get netmask
"$config" netmask
21 [ -z "$netmask" -o -z "$device" ] || ifconfig
$device netmask
$netmask
23 # make sure the network state references the correct ifname
25 config_get ifname
"$config" ifname
26 uci
set "/var/state/network.$config.ifname=$ifname"
28 config_get mtu
"$cfg" mtu
29 config_get server
"$cfg" server
31 start_pppd
"$config" \
32 pty
"/usr/sbin/pptp $server --loglevel 0 --nolaunchpppd" \
33 file /etc
/ppp
/options.pptp \