#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions if have_daemon adsuck; then # copy the resolv.conf generated by dhcpcd to the adsuck directory cp -f /etc/resolv.conf /var/adsuck/ fi if ! ck_daemon adsuck; then # create a new resolv.conf containing one entry pointing to the loopback device echo "nameserver 127.0.0.1" > /etc/resolv.conf # make adsuck reload the config to make sure the new resolv.conf file is read /etc/rc.d/adsuck reload fi