~ubuntu-branches/debian/sid/ppp/sid

« back to all changes in this revision

Viewing changes to extra/ppp-udeb.ip-up

  • Committer: Bazaar Package Importer
  • Author(s): Eddy Petrișor
  • Date: 2007-03-17 22:31:45 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070317223145-felzh5yrmh8fwi8t
Tags: 2.4.4rel-8
* urgency high since fixes an RC bug
* make sure the /etc/resolv.conf file is world readable (Closes: #415077)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# adds the DNS servers got via ppp to the global resolv.conf
 
3
# License: GPL
 
4
# Copyright Eddy Petrișor <eddy.petrisor@gmail.com> 2006
 
5
 
 
6
umask 0022 # normally ran by pppd with 0077
 
7
: >> /etc/resolv.conf
 
8
MARK='added by D-I (pppd)'
 
9
cp /etc/resolv.conf /tmp/resolv.conf.tmp
 
10
sed "/#$MARK/d" /tmp/resolv.conf.tmp > /etc/resolv.conf
 
11
rm -f /tmp/resolv.conf.tmp
 
12
[ "$DNS1" ] && echo "nameserver $DNS1 #$MARK" >> /etc/resolv.conf
 
13
[ "$DNS2" ] && echo "nameserver $DNS2 #$MARK" >> /etc/resolv.conf