gabriel rosenkoetter on Sat, 19 Jan 2002 14:33:14 -0500 |
On Sat, Jan 19, 2002 at 01:53:18PM -0500, Michael F. Robbins wrote: > DHCPCD will (by default) overwrite /etc/resolv.conf with the new > nameservers. Look for the lines "nameserver xxx.xxx.xxx.xxx". I prefer > to run a local nameserver, so I have dhcpcd run with the "-R" option so > it won't overwrite resolv.conf. Is there no way to just add your information in before dhcpcd does the writing? dhclient, by Ted Lemon of the ISC and the default dhcp client in the BSDs and, last I heard, Debian, makes this really easy; you can just overwrite the function that does the actual writing of the resolv.conf file. I do this: make_resolv_conf() { if [ \( ! -z "$new_domain_name" \) -a \ \( ! -z "$new_domain_name_servers" \) ]; then #echo search $new_domain_name > $RESOLV echo search eclipsed.net swarthmore.edu speakeasy.net > $RESOLV echo "nameserver 10.0.0.1" >> $RESOLV for nameserver in $new_domain_name_servers; do echo nameserver $nameserver done >> $RESOLV fi } (Yes, I run a DNS on my firewall. It's BIND9 set to only look at the internal interface, so it's really not a liability.) -- gabriel rosenkoetter gr@eclipsed.net Attachment:
pgpbVlBypmujF.pgp
|
|