#!/bin/bash # latest-kernel-support: 2.6.18 # Author: Kevin Lloyd # Date: 10/20/2006 if [ "$PPP_IFACE" = "" ]; then exit 1 fi if [ $PPP_IFACE = ppp0 ]; then if [ -e /var/run/ppp/resolv.conf ]; then grep -v ppp0 /etc/resolv.conf > /etc/resolv.conf.orig echo \#These entries are from the ppp0 connection > /etc/resolv.conf sed -e 's/$/ #ppp0 entry/g' /var/run/ppp/resolv.conf >> /etc/resolv.conf cat /etc/resolv.conf.orig >> /etc/resolv.conf chmod a+r /etc/resolv.conf elif [ -e /etc/ppp/resolv.conf ]; then grep -v ppp0 /etc/resolv.conf > /etc/resolv.conf.orig echo \#These entries are from the ppp0 connection > /etc/resolv.conf sed -e 's/$/ #ppp0 entry/g' /etc/ppp/resolv.conf >> /etc/resolv.conf cat /etc/resolv.conf.orig >> /etc/resolv.conf chmod a+r /etc/resolv.conf fi fi