On Tue, Jan 03, 2006 at 10:34:48AM -0600, Justin H Haynes wrote: > Chris Zakelj wrote: > Good Idea. Actually, since everyone may not even need this little hack, > I've just changed it to create in /var/www/etc/: > resolv.conf.local > resolv.conf.OpenNIC > Then users can copy one if they need it. here is a diff to the original > script.
> patch gallery-openbsd-chroot-install.sh << EOF > 64c64,72 > < # 16 After it's all working, cd to /var/www/htdocs/gallery and run > --- > ># 16 For Email functionality, you may need a resolv.conf in the > ># chrooted environment if you are using a remote smtp server. > ># This script will have placed two files in /var/www/etc: > ># resolv.conf.local (from /etc), and resolv.conf.OpenNIC (from > ># OpenNIC. If you need one, then just > ># cd /var/www/etc > ># cp <one of those> resolv.conf > ># (1/3/2006: Justin at Haynes dot net) > ># 17 After it's all working, cd to /var/www/htdocs/gallery and run > 103a112 > >mkdir -p /var/www/etc > 104a114,118 > ># Get nameservers from OpenNIC. > ># > >echo "Getting nameservers from OpenNIC" > >cd /var/www/etc/ > >lynx -dump http://www.opennic.unrated.net/cgi-bin/get_tier2_txt.sh | grep > >-v ^$ | awk '{print "nameserver " $2}' > resolv.conf.OpenNIC > 114a129,131 > >echo 'Copying resolv.conf...' > >cd /var/www/etc > >cp /etc/resolv.conf resolv.conf.local > EOF I'm afraid this'll result in lots of questions on [EMAIL PROTECTED] I, for one, would be stumped as to why I'd want OpenNIC. It might be worthwhile noting that if your nameservers change a lot, it might be a good idea to put OpenNIC servers in chroot'ed resolv.conf files, as those will always be accessible and functional. (Alternatively, copy /etc/resolv.conf after each change - isn't there a dhclient hook for such a thing?) Joachim

