File: resolvconf.000resolvconf.ppp.ip-up

package info (click to toggle)
resolvconf 1.94
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 544 kB
  • sloc: sh: 906; makefile: 19; sed: 13
file content (33 lines) | stat: -rwxr-xr-x 561 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# PPP up hook script for resolvconf
#
# Reconfigures resolver to take into account
# the appearance of the ppp interface.
#
# This file is part of the resolvconf package.
#

[ -x /usr/sbin/resolvconf ] || exit 0

[ "$USEPEERDNS" ] || exit 0

case "$6" in
  nm-pptp-service-*|nm-l2tp-service-*|/org/freedesktop/NetworkManager/PPP/*)
	# NetworkManager handles it
	exit 0
	;;
esac

R=""
if [ "$DNS1" ] ; then
	R="${R}nameserver $DNS1
"
fi
if [ "$DNS2" ] ; then
	R="${R}nameserver $DNS2
"
fi

echo -n "$R" | /usr/sbin/resolvconf -a "${PPP_IFACE}.pppd"