PPP and dynamic IP and DNS allocation

Geoff Shang gshang10 at scu.edu.au
Sun Jun 18 06:59:09 EDT 2000


Hi:

And now I've completely wrecked my credibility by failing to include the
scripts.  Durrr.  Here they are.

Enjoy!

Geoff.

-- 
Geoff Shang <gshang10 at scu.edu.au>
ICQ number 43634701
-------------- next part --------------

#
# This sample code shows you one way to modify your setup to allow automatic
# configuration of your resolv.conf for peer supplied DNS addresses when using
# the `usepeerdns' option.
#
# In my case I just added this to my /etc/ppp/ip-up.local script. You may need to 
# create an executable script if one does not exist.
#
# Nick Walker (nickwalker at email.com)
#

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

-------------- next part --------------

#
# This sample code shows you one way to modify your setup to allow automatic
# configuration of your resolv.conf for peer supplied DNS addresses when using
# the `usepeerdns' option.
#
# In my case I just added this to my /etc/ppp/ip-down.local script. You may need to 
# create an executable script if one does not exist.
#
# Nick Walker (nickwalker at email.com)
#

if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
	if [ -f /etc/ppp/resolv.prev ]; then
		cp -f /etc/ppp/resolv.prev /etc/resolv.conf
	else
		rm -f /etc/resolv.conf
	fi
fi



More information about the Speakup mailing list