| 1 | #!/bin/shscip-shell filesystem . . `/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.confscip-shell filesystem . . `/etc/resolv.conf`. |
| 8 | MARK='added by D-I (pppd)' |
| 9 | cpscip-shell system . . cp. /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`. /tmp/resolv.conf.tmpscip-shell filesystem . . `/tmp/resolv.conf.tmp`. |
| 10 | sedscip-shell system . . sed. "/#$MARK/d" /tmp/resolv.conf.tmpscip-shell filesystem . . `/tmp/resolv.conf.tmp`. > /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`. |
| 11 | rmscip-shell system . . rm. -f /tmp/resolv.conf.tmpscip-shell filesystem . . `/tmp/resolv.conf.tmp`. |
| 12 | [scip-shell system . . `[`. "$DNS1" ] && echoscip-shell system . . echo. "nameserver $DNS1 #$MARK" >> /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`. |
| 13 | [scip-shell system . . `[`. "$DNS2" ] && echoscip-shell system . . echo. "nameserver $DNS2 #$MARK" >> /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`. |