From owner-freebsd-questions Fri May 5 0:42:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from foobie.net (adsl-216-103-105-178.dsl.snfc21.pacbell.net [216.103.105.178]) by hub.freebsd.org (Postfix) with ESMTP id 1314B37B9F2 for ; Fri, 5 May 2000 00:42:09 -0700 (PDT) (envelope-from sbeitzel@foobie.net) Received: (from sbeitzel@localhost) by foobie.net (8.9.3/8.9.3) id AAA00400 for freebsd-questions@FreeBSD.ORG; Fri, 5 May 2000 00:42:07 -0700 (PDT) (envelope-from sbeitzel) From: Stephen Beitzel Message-Id: <200005050742.AAA00400@foobie.net> Subject: xntpd startup duplication To: freebsd-questions@FreeBSD.ORG Date: Fri, 5 May 2000 00:42:06 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have noticed that when I start up my FreeBSD (3.4) box, xntpd gets started twice. The second time, it fails to run (gracefully) and writes a message to the console saying that the port it wanted to use was already in use by something else. (Duh. The first instance of xntpd.) Anyway, I finally got curious and went looking through the /etc/rc* files. It turns out that /etc/rc and /etc/rc.network both invoke xntpd. The test is different, though: From /etc/rc: if [ "X${xntpd_enable}" != X"NO" ]; then echo -n ' xntpd'; xntpd fi From /etc/rc.network: if [ "X${xntpd_enable}" = X"YES" ]; then echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags} fi A couple of thoughts occured to me. 1) It seems silly to me to have this test occur in two places. Probably, whoever the maintainer is for the rc files ought to remove it from one of them. 2) If one is going to perform the same test in two locations, one really ought to test against the same constant. With the current configuration, I can add a line to /etc/rc.conf setting xntpd_enable to "N" and that will run the executable "xntpd" with no flags. That's a surprising result, particularly if one looks at rc.network. If one wanted to run xntpd with some parameters, one would have to modify /etc/rc, since setting xntpd_enable to "YES" would invoke xntpd from /etc/rc and then try to invoke it again from /etc/rc.network -- causing the second process to exit with a message. Is this the proper place to raise concerns like this? Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message