#!/bin/sh #---------------------------------------------------------------------------- # /etc/ppp/ip-down800.dns - called whenever a (i)ppp connection # over default circuit has been come down and dns is installed # # Creation: 2007-11-29 lanspezi # Last Update: $Id$ #---------------------------------------------------------------------------- # restore etc/resolv.dnsmasq from etc/resolv.dnsmasq.bak #---------------------------------------------------------------------------- resolv_file=/etc/resolv.dnsmasq # is a default-route-interface going down & etc/resolv.dnsmasq.bak exist? if [ "$is_default_route" = "yes" -a -f $resolv_file.bak ] then # yes, restore etc/resolv.dnsmasq mv $resolv_file.bak $resolv_file chown dns:dns $resolv_file killall -HUP dnsmasq echo "$resolv_file restored." fi