support manual-nameserver.
[vuplus_openvuplus] / meta-openvuplus / recipes-connectivity / openresolv / openresolv-3.5.2 / 000resolvconf.ppp.ip-up
1 #!/bin/sh
2 # ppp.ip-up hook script for resolvconf
3 # Written by Roy Marples <roy@marples.name> under the BSD-2 license
4
5 [ -x /sbin/resolvconf ] || exit 0
6
7 if [ -n "$DNS1" -o -n "$DNS2" ]; then
8         conf="# Generated by ppp.ip-up for $PPP_IFACE\n"
9         [ -n "$DNS1" ] && conf="${conf}nameserver $DNS1\n"
10         [ -n "$DNS2" ] && conf="${conf}nameserver $DNS2\n"
11         printf "$conf" | /sbin/resolvconf -a "$PPP_IFACE"
12 fi