~ubuntu-branches/ubuntu/oneiric/ppp/oneiric

« back to all changes in this revision

Viewing changes to scripts/ip-up.local.add

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-11-24 18:12:47 UTC
  • mfrom: (1.2.5 upstream) (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20101124181247-2fopr1k0ic1t6svs
Tags: 2.4.5-4ubuntu1
* Merge with Debian; remaining changes:
  - /etc/ppp/options: default is noauth instead of auth.
  - extra/pon: Perform ppp_on_boot migration from pppoe package.
  - debian/ppp.postinst: init script migration for version before
    2.4.5~git20081126t100229-0ubuntu2.
  - debian/ppp.pppd-dns: Update LSB header.
  - Provide pppoe_on_boot file.
  - Move pppd-dns script to S45.
  - debian/patches/load_ppp_generic_if_needed: load ppp_generic kernel
    module if needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-up.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
        rm -f /etc/ppp/resolv.prev
 
15
        if [ -f /etc/resolv.conf ]; then
 
16
                cp /etc/resolv.conf /etc/ppp/resolv.prev
 
17
                grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
 
18
                grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
 
19
                cat /etc/ppp/resolv.conf >> /etc/resolv.conf
 
20
        else
 
21
                cp /etc/ppp/resolv.conf /etc
 
22
        fi
 
23
fi
 
24