#!/usr/bin/sh #---------------------------------------------------------------------------- # /etc/ppp/ip-up.dns # # Creation: 2001-08-22 tb # Last Update: $Id$ # # Copyright (c) 2001-2005 Tom Bork # Copyright (c) 2012-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- if [ -f /run/${interface}.usepeerdns ] # $interface.usepeerdns existing? then usepeerdns=$(cat /run/${interface}.usepeerdns) # set usepeerdns yes or no else usepeerdns='no' # set usepeerdns no fi if [ "${usepeerdns}" = "yes" ] then #include eisdate-time . /var/install/include/eistime { echo '# --------------------------------------------------------------------------' echo '# /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf' echo '# autogenerated by netconfig!' echo '#' echo "# Last Update: ${EISDATE} ${EISTIME} by /etc/ppp/ip-up.dns" echo '# --------------------------------------------------------------------------' if [ -n "${domain}" ] then echo "search ${domain}" fi for dns in ${DNS1} ${DNS2} do echo "nameserver ${dns}" done } >/run/netconfig/resolv.conf else /usr/bin/systemctl restart resolver.service fi