Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 331177f1cf202be42c638edbb206ddef > files > 6

gpppwrap-1.0-3mdk.i586.rpm

#!/bin/sh
# This script is executed by pppd as soon as the ip-connection is up.
# The script is run by pppd with the following arguments:
# interface dev    speed  my-IP          remote-IP   ipparam(empty)
# ppp0 /dev/modem 38400 194.94.253.30 194.94.253.4
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
export PATH

DNSPROXY="dnrd"
if [ -n "$DNS1" ]; then
	echo "# dynamic DNS set by ip-up.local:" > /etc/resolv.conf
	# loop over all DNS server (max 2):
	for dns in $DNS1 $DNS2; do
		echo "nameserver $dns" >> /etc/resolv.conf
		# build up the dns proxy string:
		DNSPROXY="$DNSPROXY -s $dns"
	done
	[ -x "/usr/sbin/dnrd" ] && eval $DNSPROXY
else
	# check for static DNS server defined in the file /etc/ppp/dnsstatic
	if [ -r "/etc/ppp/dnsstatic" ]; then
	echo "# static DNS set by ip-up.local:" > /etc/resolv.conf
	# loop over all DNS server (could be many lines):
	for dns in `sed -e 's/#.*//g' /etc/ppp/dnsstatic`; do
		echo "nameserver $dns" >> /etc/resolv.conf
		# build up the dns proxy string:
		DNSPROXY="$DNSPROXY -s $dns"
	done
	[ -x "/usr/sbin/dnrd" ] && eval $DNSPROXY
	fi
fi
#
exit 0