#!/bin/sh #---------------------------------------------------------------------------- # Creation: ??.??.2003 lanspezi # Last Update: $Id: ip-up200.dhcpcd 8079 2005-03-23 21:22:53Z lanspezi $ #---------------------------------------------------------------------------- if [ "$is_default_route" = "yes" -a ! -f /etc/dnsmasq.conf ]; then if [ -f /var/run/$interface.usepeerdns ]; then read usepeerdns < /var/run/$interface.usepeerdns else usepeerdns='no' fi if [ "$usepeerdns" = "yes" ]; then if [ "$DNS1" -o "$DNS2" ]; then cp /etc/resolv.conf /etc/resolv.conf.$interface { echo '#' echo '# automatically created by ip-up200.dhcpcd' echo '#' for dns in $DNS1 $DNS2; do echo "nameserver $dns" logger -t ip-up200.dhcpcd "using nameserver $dns" done } > /etc/resolv.conf else echo "Your provider didn't send nameserver addresses, forwarders not changed" fi else echo "peerdns disabled for $interface" fi fi