updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / adsuck / 50-adsuck-update
blobcba41885ca9b934244250ab2048fc695cad80444
1 #!/bin/bash
2 . /etc/rc.conf
3 . /etc/rc.d/functions
5 if have_daemon adsuck; then
6 # copy the resolv.conf generated by dhcpcd to the adsuck directory
7 cp -f /etc/resolv.conf /var/adsuck/
8 fi
10 if ! ck_daemon adsuck; then
11 # create a new resolv.conf containing one entry pointing to the loopback device
12 echo "nameserver 127.0.0.1" > /etc/resolv.conf
13 # make adsuck reload the config to make sure the new resolv.conf file is read
14 /etc/rc.d/adsuck reload