Huge refactor for 4.2
[auto-patcher.git] / patches / 3gdongle / 4.1 / common / system / etc / ppp / init_pppd_gprs
blobf540ae3672707393b8e1eddd60f447ef80120040
1 #!/system/bin/sh
2 # An unforunate wrapper script
3 # so that the exit code of pppd may be retrieved
6 # this is a workaround for issue #651747
7 #trap "/system/bin/sleep 1;exit 0" TERM
9 PPPD_TTY=$(/system/bin/getprop ril.pppd_tty)
10 if test -z "$PPPD_TTY" ; then
11 /system/bin/setprop ril.pppd_tty /dev/ttyUSB0
13 PPPD_PID=
15 /system/bin/setprop "net.gprs.ppp-exit" ""
17 /system/bin/log -t pppd "Starting pppd"
19 /system/bin/pppd $PPPD_TTY 460800 $* call gprs debug kdebug 8 dump
21 PPPD_EXIT=$?
22 PPPD_PID=$!
24 /system/bin/log -t pppd "pppd exited with $PPPD_EXIT"
26 /system/bin/setprop "net.gprs.ppp-exit" "$PPPD_EXIT"