#!/bin/sh #---------------------------------------------------------------------------- # /etc/ppp/ipv6-down800.dns __FLI4LVER__ # # called whenever an IPv6 PPP connection over default circuit has been shut # down and dnsmasq is installed # # Last Update: $Id$ #---------------------------------------------------------------------------- resolv_file=/etc/resolv.dnsmasq # is a default-route-interface going down? if [ "$is_default_route" = "yes" ] then if lock_resource $(basename $resolv_file) ipv6-down800.dns then # does /etc/resolv.dnsmasq.bak exist? if [ -f $resolv_file.bak ] then # yes, restore etc/resolv.dnsmasq mv $resolv_file.bak $resolv_file chown dns:dns $resolv_file echo "$resolv_file restored." killall -HUP dnsmasq fi unlock_resource $(basename $resolv_file) ipv6-down800.dns fi fi