home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / doc / ppp / examples / scripts / ip-down.local.add < prev    next >
Encoding:
Text File  |  2008-11-26  |  548 b   |  21 lines

  1.  
  2. #
  3. # This sample code shows you one way to modify your setup to allow automatic
  4. # configuration of your resolv.conf for peer supplied DNS addresses when using
  5. # the `usepeerdns' option.
  6. #
  7. # In my case I just added this to my /etc/ppp/ip-down.local script. You may need to 
  8. # create an executable script if one does not exist.
  9. #
  10. # Nick Walker (nickwalker@email.com)
  11. #
  12.  
  13. if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
  14.     if [ -f /etc/ppp/resolv.prev ]; then
  15.         cp -f /etc/ppp/resolv.prev /etc/resolv.conf
  16.     else
  17.         rm -f /etc/resolv.conf
  18.     fi
  19. fi
  20.  
  21.