ip-up.local.add 729 B

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