summaryrefslogtreecommitdiff
path: root/recipes/ppp/files/08setupdns
blob: 5be2d3831bf7397ba2732b1c9e302b154aded189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
ACTUALCONF=/var/run/resolv.conf
PPPCONF=/var/run/ppp/resolv.conf
if [ -x /sbin/resolvconf ] ; then
	cat $PPPCONF | resolvconf -a $PPP_IFACE
elif [ -f $PPPCONF ] ; then
	if [ -f $ACTUALCONF ] ; then
		if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then
			mv $ACTUALCONF $ACTUALCONF.ppporig
		fi
	fi

	ln -sf $PPPCONF $ACTUALCONF
fi