Debian Codegraph @

debian/extra/udeb/ip-up

raw symbols SCIP
1 #!/bin/sh
2 # adds the DNS servers got via ppp to the global resolv.conf
3 # License: GPL
4 # Copyright Eddy PetriČ™or <[email protected]> 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