Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbdab64d authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 4592 into donut

* changes:
  rootdir: Remove gprs/pppd related scripts.
parents a1140ad4 abd54c1b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -6,16 +6,10 @@ include $(CLEAR_VARS)
copy_from := \
	etc/dbus.conf \
	etc/init.goldfish.sh \
	etc/ppp/ip-up \
	etc/ppp/ip-down \
	etc/ppp/peers/common \
	etc/racoon/racoon.conf \
	etc/hosts

dont_copy := \
	etc/init.gprs-pppd \
	etc/ppp/chap-secrets

copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))

rootdir/etc/init.gprs-pppd

deleted100755 → 0
+0 −23
Original line number Diff line number Diff line
#!/system/bin/sh
# An unforunate wrapper script 
# so that the exit code of pppd may be retrieved


# this is a workaround for issue #651747
#trap "/system/bin/sleep 1;exit 0" TERM


PPPD_PID=

/system/bin/setprop "net.gprs.ppp-exit" ""

/system/bin/log -t pppd "Starting pppd"

/system/bin/pppd $*

PPPD_EXIT=$?
PPPD_PID=$!

/system/bin/log -t pppd "pppd exited with $PPPD_EXIT"

/system/bin/setprop "net.gprs.ppp-exit" "$PPPD_EXIT"

rootdir/etc/ppp/chap-secrets

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
* * bogus

rootdir/etc/ppp/ip-down

deleted100755 → 0
+0 −1
Original line number Diff line number Diff line
#!/system/bin/sh

rootdir/etc/ppp/ip-up

deleted100755 → 0
+0 −33
Original line number Diff line number Diff line
#!/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