2 route
-n |
awk '$1 == "0.0.0.0" { print $2; exit }'
5 stop_interface_pptp
() {
6 stop_interface_ppp
"$1"
9 coldplug_interface_pptp
() {
10 setup_interface_pptp
"pptp-$1" "$1"
13 setup_interface_pptp
() {
17 config_get device
"$config" device
18 config_get ipproto
"$config" ipproto
19 config_get server
"$config" server
21 for module
in slhc ppp_generic ppp_async ip_gre
; do
22 /sbin
/insmod
$module 2>&- >&-
26 setup_interface
"$device" "$config" "${ipproto:-dhcp}"
29 [ "$gw" != 0.0.0.0 ] && route delete
"$server" 2>/dev
/null
>/dev
/null
30 route add
"$server" gw
"$gw"
34 config_get netmask
"$config" netmask
35 [ -z "$netmask" -o -z "$device" ] || ifconfig
$device netmask
$netmask
37 config_get mtu
"$config" mtu
39 start_pppd
"$config" \
40 pty
"/usr/sbin/pptp $server --loglevel 0 --nolaunchpppd" \
41 file /etc
/ppp
/options.pptp \