#!/bin/sh
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
        rm -f /etc/ppp/resolv.prev
        if [ -f /etc/resolv.conf ]; then
                cp /etc/resolv.conf /etc/ppp/resolv.prev
                grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
                grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
                cat /etc/ppp/resolv.conf >> /etc/resolv.conf
        else
                cp /etc/ppp/resolv.conf /etc
        fi
fi
