Closed yurivict closed 6 years ago
Thanks @yurivict.
Can somebody on FreeBSD confirm this for me? A pull request would be great :-)
I still need someone to try this n FreeBSD.
Hi, I just tried this on my FreeBSD 11.1 box and it appears to work. I manually added the line nscd_enable="YES"
to my /etc/rc.conf file rather than use the sysrc utility. That is just personal preference I think. My only comment on the whole method is that using nscd at all is optional. It will improve performance by caching the results of /etc/hosts but I think this is going to be of marginal benefit for my usage scenario.
Thank you for the input, Thomas @Guymer!
So is there really anything that needs to be added for FreeBSD? Sounds like these instructions weren't actually needed perhaps (can't confirm personally unfortunately)?
I think a comment in the Reloading Hosts File section about enabling nscd and using nscd.conf on FreeBSD would be beneficial. The only difference between what I did and what @yurivict did was exactly how we each enabled nscd in rc.conf. @yurivict's way is safer for new FreeBSD users.
@Guymer : So what command would they use to clear the DNS cache after they have enabled nscd
(didn't realize it wasn't enabled by default)? Something along the lines of nscd --invalidate=????
@gfyoung : You can either restart the machine or run service nscd restart
(as root) to restart the nscd service.
@Guymer : Gotcha. Just to double check:
ncsd
from @yurivict require root as well?nscd
daemon? (e.g. /etc/inid.d/nscd
) ?@gfyoung :
ncsd
from @yurivict require root; andnscd
service script is /etc/rc.d/nscd
and the full path to the nscd
binary is /usr/sbin/nscd
(though this really should not be relevant).(though this really should not be relevant).
@Guymer : If you look at our code, we already have a section of logic for nscd
. Hence, I wanted to double check that we could just incorporate it into that section instead of writing custom logic for FreeBSD.
Thanks everybody!
You should include the FreeBSD usage section: It is recommended that DNS requests are cached using nscd(8).