#!/bin/sh #---------------------------------------------------------------------------- # /etc/ppp/ip-down800.dhcp __FLI4LVER__ # # called whenever an IPv4 PPP connection over default circuit has been shut # down and dnsmasq is not installed # # Creation: ??.??.2003 lanspezi # Last Update: $Id$ #---------------------------------------------------------------------------- # back up etc/resolv to etc/resolv.bak # if provider supports sending ip(s) of dns server(s) #---------------------------------------------------------------------------- resolv_file=/etc/resolv.conf if [ ! -f /etc/dnsmasq.conf ] then if lock_resource $(basename $resolv_file) ip-down800.dhcp then if [ -f $resolv_file.$interface ] then echo "restoring previous resolv.conf (resolv.conf.$interface)" mv $resolv_file.$interface $resolv_file fi unlock_resource $(basename $resolv_file) ip-down800.dhcp fi fi