huangcm
2024-12-18 9d29be7f7249789d6ffd0440067187a9f040c2cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/system/bin/sh
# An unforunate wrapper script 
# so that the exit code of pppd may be retrieved
 
 
#PPPD_PID=""
PPPD_EXIT=""
 
/system/bin/setprop "net.gprs.ppp-exit" ""
 
/system/bin/log -t pppd "Starting pppd"
 
/system/bin/log -t pppd "PARAM1: $1"
/system/bin/log -t pppd "PARAM2: $2"
/system/bin/log -t pppd "PARAM3: $3"
/system/bin/log -t pppd "PARAM4: $4"
/system/bin/log -t pppd "PARAM5: $5"
 
if [ $# -lt 6 ] ; then
 
/system/bin/pppd $1 debug defaultroute noauth nodetach nocrtscts novj noipdefault usepeerdns user "$2" password "$3" connect "$4" disconnect "$5"
 
else
 
/system/bin/log -t pppd "PARAM6: $6"
/system/bin/pppd $1 debug defaultroute noauth nodetach nocrtscts $2 noipdefault usepeerdns user "$3" password "$4" connect "$5" disconnect "$6"
fi
PPPD_EXIT=$?
#PPPD_PID=$!
 
#/system/bin/log -t pppd "pppd pid: $PPPD_PID"
/system/bin/log -t pppd "pppd exited with $PPPD_EXIT"
 
/system/bin/setprop "net.gprs.ppp-exit" "$PPPD_EXIT"