From owner-freebsd-questions@FreeBSD.ORG Mon Aug 16 04:49:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2426F16A4CE for ; Mon, 16 Aug 2004 04:49:22 +0000 (GMT) Received: from szamoca.krvarr.bc.ca (s142-179-111-232.bc.hsia.telus.net [142.179.111.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C37243D5C for ; Mon, 16 Aug 2004 04:49:19 +0000 (GMT) (envelope-from sandy@krvarr.bc.ca) Received: from szamoca.krvarr.bc.ca (localhost [127.0.0.1]) by szamoca.krvarr.bc.ca (8.12.11/8.12.6) with ESMTP id i7G4nFPm000568 for ; Sun, 15 Aug 2004 21:49:15 -0700 (PDT) Received: (from sandy@localhost) by szamoca.krvarr.bc.ca (8.12.11/8.12.11/Submit) id i7G4nEJD000565; Sun, 15 Aug 2004 21:49:14 -0700 (PDT) (envelope-from sandy) From: Sandy Rutherford MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16672.15562.754097.562477@szamoca.krvarr.bc.ca> Date: Sun, 15 Aug 2004 21:49:14 -0700 To: freebsd-questions@freebsd.org X-Mailer: VM 7.07 under Emacs 21.3.1 Subject: ypserv, svctcp_create, and spamd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2004 04:49:22 -0000 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