down 1.0 KB

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # This script is run by the pppd after the link is established.
  4. # It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
  5. # set IP address, run the mailq etc. you should create script(s) there.
  6. #
  7. # Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
  8. # after that package), so choose local script names with that in mind.
  9. #
  10. # This script is called with the following arguments:
  11. # Arg Name Example
  12. # $1 Interface name ppp0
  13. # $2 The tty ttyO1
  14. # $3 The link speed 38400
  15. # $4 Local IP number 12.34.56.78
  16. # $5 Peer IP number 12.34.56.99
  17. # $6 Optional ``ipparam'' value foo
  18. # The environment is cleared before executing this script
  19. # so the path must be reset
  20. PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
  21. export PATH
  22. PPPDCNT=`cat /etc/PPPDCNT`
  23. echo "$PPPDCNT :DOWN:"`date`" IP: $4" >> /etc/PPPDTIME
  24. killall gsmMuxd_Ser