diff options
author | Chia-chi Yeh <chiachi@android.com> | 2009-06-18 17:18:51 +0800 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2009-06-18 17:18:51 +0800 |
commit | abd54c1b78983ce425250dba137e203b7020637e (patch) | |
tree | f3ffb8ce9a9bdc2b7637517bd83dbc5034377ed1 /rootdir/etc/ppp/ip-up | |
parent | bfa2f8e9b506a4b710ebcefa7c1e324609b8ca34 (diff) | |
download | system_core-abd54c1b78983ce425250dba137e203b7020637e.zip system_core-abd54c1b78983ce425250dba137e203b7020637e.tar.gz system_core-abd54c1b78983ce425250dba137e203b7020637e.tar.bz2 |
rootdir: Remove gprs/pppd related scripts.
vpn related scripts will be updated in the next change.
Diffstat (limited to 'rootdir/etc/ppp/ip-up')
-rwxr-xr-x | rootdir/etc/ppp/ip-up | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/rootdir/etc/ppp/ip-up b/rootdir/etc/ppp/ip-up deleted file mode 100755 index 8c8f12c..0000000 --- a/rootdir/etc/ppp/ip-up +++ /dev/null @@ -1,33 +0,0 @@ -#!/system/bin/sh - -# Use interface name if linkname is not available - -/system/bin/setprop "net.dns1" "$DNS1" -/system/bin/setprop "net.dns2" "$DNS2" - -# Retrieve the default gateway from /proc/net/route -RTAB=`cat /proc/net/route` -flag=-1; i=0; -for l in $RTAB; do - if (exp flag==1) then DGW=$l; flag=0; fi; - if (exp i%11 == 1) then - if (exp $l=="00000000") then flag=1; fi; - fi; - i=`exp i+1`; -done -FH=${DGW%????} -LH=${DGW#????} -A=`exp 0x${LH#??}` -B=`exp 0x${LH%??}` -C=`exp 0x${FH#??}` -D=`exp 0x${FH%??}` -GATEWAY="$A.$B.$C.$D" -VPNSERVER=`getprop "net.vpn.server_ip"` - -# Protect the route to vpn server -/system/bin/route add -net $VPNSERVER netmask 255.255.255.255 gw $GATEWAY - -# Route all traffic to vpn connection -/system/bin/route add -net 0.0.0.0 netmask 128.0.0.0 gw $IPREMOTE -/system/bin/route add -net 128.0.0.0 netmask 128.0.0.0 gw $IPREMOTE - |