Advertisement
Guest User

Untitled

a guest
Jul 4th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/system/bin/sh
  2. # An unforunate wrapper script
  3. # so that the exit code of pppd may be retrieved
  4.  
  5.  
  6. # this is a workaround for issue #651747
  7. #trap "/system/bin/sleep 1;exit 0" TERM
  8.  
  9.  
  10. PPPD_PID=
  11.  
  12. /system/bin/setprop "net.cdma.ppp-exit" ""
  13.  
  14. /system/bin/log -t pppd "Starting pppd"
  15.  
  16. TTYNAME=`/system/bin/getprop net.cdma.datalinkinterface`
  17. USER=`/system/bin/getprop net.cdma.pppd.user`
  18. PASSWORD=`/system/bin/getprop net.cdma.pppd.password`
  19.  
  20. /system/xbin/pppd $TTYNAME 115200 $USER $PASSWORD usepeerdns defaultroute $*
  21.  
  22. PPPD_EXIT=$?
  23. PPPD_PID=$!
  24.  
  25. /system/bin/log -t pppd "pppd exited with $PPPD_EXIT"
  26.  
  27. /system/bin/setprop "net.cdma.ppp-exit" "$PPPD_EXIT"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement