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

package info (click to toggle)
openresolv 3.13.2-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 244 kB
  • sloc: sh: 1,778; makefile: 124
file content (12 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# ppp.ip-up hook script for resolvconf
# Written by Roy Marples <roy@marples.name> under the BSD-2 license

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

if [ -n "$DNS1" -o -n "$DNS2" ]; then
	conf="# Generated by ppp.ip-up for $PPP_IFACE\n"
	[ -n "$DNS1" ] && conf="${conf}nameserver $DNS1\n"
	[ -n "$DNS2" ] && conf="${conf}nameserver $DNS2\n"
	printf "$conf" | /usr/sbin/resolvconf -a "$PPP_IFACE"
fi