android_device_allwinner-full/common/rild/call-pppd
2016-08-05 21:03:18 -04:00

24 lines
683 B
Bash
Executable file

#!/system/bin/sh
# An unforunate wrapper script
# so that the exit code of pppd may be retrieved
PPPD_EXIT=""
/system/bin/setprop "net.gprs.ppp-exit" ""
/system/bin/log -t pppd "Starting pppd"
/system/bin/log -t pppd "PORT: $1"
/system/bin/log -t pppd "USER: $2"
/system/bin/log -t pppd "PSWD: $3"
/system/bin/log -t pppd "CONN: $4"
/system/bin/log -t pppd "DISC: $5"
/system/bin/pppd $1 debug defaultroute noauth connect-delay 5000 ipcp-max-failure 60 nodetach nocrtscts novj noipdefault usepeerdns user "$2" password "$3" connect "$4" disconnect "$5"
PPPD_EXIT=$?
/system/bin/log -t pppd "pppd exited with $PPPD_EXIT"
/system/bin/setprop "net.gprs.ppp-exit" "$PPPD_EXIT"