Ken, Thanks for the tip! pkg_scripts did the trick (I'd never seen that mechanism before). With regards to making adsuck play nice with dhcp (yes, I tired the "script" line from the readme only to get errors), maybe the dhclient-adsuck script was rewritten? I've done nothing special and yet it all just works. Following is my setup on 5.3 i386 (after your advice):
# grep adsuck /etc/rc.conf.local: pkg_scripts="adsuck" # notice I've removed the adsuck_flags variable # grep nameserver /etc/resolv.conf: nameserver 127.0.0.1 # cat /etc/dhclient.conf: supersede domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, routers, domain-name-servers, domain-name, host-name; # grep nameserver /var/adsuck/files/resolv.conf: nameserver 75.75.75.75 nameserver 75.75.76.76 # ls /var/adsuck/files/hosts.small: /var/adsuck/files/hosts.small Although I thrashed around a lot trying to get it to work, once I rolled back all my changes I guess all that needs to happen (in my case) is: cp /etc/resolv.conf /var/adsuck/files/ print 'pkg_scripts="adsuck"' >>/etc/rc.conf.local print "prepend domain-name-servers 127.0.0.1;" >>/etc/dhclient.conf and change /etc/resolv.conf to contain only: nameserver 127.0.0.1 Thanks again for your help. -Scott On Fri, May 3, 2013 at 3:40 PM, Kenneth R Westerback <kwesterb...@rogers.com > wrote: > On Fri, May 03, 2013 at 02:52:06PM -0700, Scott wrote: > > Good day, > > I can't get adsuck to start at boot on OpenBSD 5.3. I copied strings > like a > > monkey and thought them over (even testing them in shell), but no luck. > > > > # grep adsuck /etc/rc.conf.local: > > adsuck_flags="-c /var/adsuck -f /files/resolv.conf /files/hosts.small" > > > > # cat /etc/rc.local: > > if [ "$adsuck_flags" != "NO" -a -x /usr/local/sbin/adsuck ]; then > > echo -n ' adsuck' > > /usr/local/sbin/adsuck "$adsuck_flags" > > fi > > You may want to use the pkg_scripts variable in rc.conf.local. i.e. > rather than modifying /etc/rc.local. > > > > > # which adsuck: > > /usr/local/sbin/adsuck > > > > Adsuck does work properly if started manually using: > > sudo adsuck -c /var/adsuck -f /files/resolv.conf /files/hosts.small > > As far as I can see from a quick install of adsuck, I don't think it has > been adapted to the removal of the dhclient-script from dhclient's > operation. So if you are using dhcp you may be out of luck at the moment. > Or > if you are using dhcp and aduck is working on 5.3 I'd be interested in more > details on your setup, and where you got directions on setting it up. > > > > > So I know it's just something I'm doing wrong with my rc scripts. I read > > the readme in /usr/local/shar/docs/pkg-readmes/, but that only covers > > interaction with dhclient and resolv.conf. > > And, alas, does it wrong. 'script' is no longer a valid statement > in dhclient.conf and thus the provided /usr/local/sbin/dhclient-adsuck > will not be invoked by dhclient. > > .... Ken > > > > > > > Any help would be MUCH appreciated. > > > > -Scott