ypserv, svctcp_create, and spamd
Sandy Rutherford
sandy at krvarr.bc.ca
Sun Aug 15 21:49:22 PDT 2004
I have been having some problems with ypserv occasionally deciding to
listen on tcp port 783, which breaks spamd. As far as I can tell from
the source files of ypserv and svc_tcp.c, the subr svctcp_create
simply returns an arbitrary unused port.
Since services started from /usr/local/etc/rc.d, such as spamd, start
after ypserv, it may take a port needed by one of these services.
Does anybody have any recommendations on how to fix or work around
this problem? Some solutions that do come to mind are:
1. Sticking some code in spamd.sh to run `rpcinfo -p' and if any rpc
services are using 783/tcp, kill them off before starting spamd and
then restart them.
2. By pass the usual startup of ypservices in the FreeBSD boot
sequence and stick my own scripts in /usr/local/etc/rc.d, thus
ensuring that they start after any local services.
However, both of these strike me as an awful kludge.
By the way, unlike some implementations of ypserv, I don't think that
FreeBSD's consults /etc/services to either determine which port it
should use or which ports it should avoid.
Thanks in advance for any suggestions. ...Sandy
More information about the freebsd-questions
mailing list