home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.0 (User) / OS_user_4.0.iso / private / etc / ppp / Examples / ip-up.example < prev    next >
Encoding:
Text File  |  1995-07-24  |  1.1 KB  |  49 lines

  1. #!/bin/sh
  2. # -*- Fundamental -*-
  3. #
  4. #
  5. # args: interface-name tty-device speed local-IP remote-IP
  6.  
  7. PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin; export PATH
  8.  
  9. #
  10. # Add a route to localhost so netinfo won't sleep.
  11. #
  12. /usr/etc/route add $4 127.0.0.1 0
  13.  
  14. #  If we are on COM1 let the nmserver know the fruits of our network configuration
  15. #  endeavor. This allows NXHost connections. Thanks to Glenn Brown
  16. #  <gbrown@alumni.caltech.edu>  
  17.  
  18. if [ $2 = /dev/cufa ]; then
  19. pid=`ps cax | egrep nmserver | awk '{print $1;}'`
  20. if [ -n "$pid" ]; then
  21.     echo "PPP Reinitializing nmserver's network portion" > /dev/console
  22.     kill -USR2 $pid
  23. fi
  24. fi
  25.  
  26. #
  27. # Signal PPPMeter.app if using that
  28. #
  29. #/LocalApps/PPPMeter.app/pppstatus 1
  30.  
  31. #
  32. # Send any mail that has been queued while the link
  33. # was down.
  34. if [ $2 = /dev/cufa ]; then
  35. /usr/lib/sendmail -q &
  36. fi
  37.  
  38.  
  39. #
  40. # If I bring up my modem link (vs. my other direct
  41. # connection) then start up the POP3 Client to get my 
  42. # mail.  This app is killed in the ip-down script because
  43. # it doesn't behave nicely when it can't contact the server.
  44. #
  45. if [ $2 = /dev/cufa ]; then
  46. open /LocalApps/PopOver.app > /dev/console 2>&1
  47. fi
  48.  
  49.