From owner-freebsd-rc@FreeBSD.ORG Sun Feb 5 16:48:40 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B22516A422 for ; Sun, 5 Feb 2006 16:48:40 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from mailhub03.unibe.ch (mailhub03.unibe.ch [130.92.9.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0042943D69 for ; Sun, 5 Feb 2006 16:48:31 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from localhost (scanhub03.unibe.ch [130.92.254.67]) by mailhub03.unibe.ch (Postfix) with ESMTP id 1B707292B8 for ; Sun, 5 Feb 2006 17:48:30 +0100 (CET) Received: from mailhub03.unibe.ch ([130.92.9.70]) by localhost (scanhub03.unibe.ch [130.92.254.67]) (amavisd-new, port 10024) with LMTP id 28743-14-47 for ; Sun, 5 Feb 2006 17:48:27 +0100 (CET) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub03.unibe.ch (Postfix) with ESMTP id 640D829297 for ; Sun, 5 Feb 2006 17:48:28 +0100 (CET) Received: from droopy.unibe.ch (droopy [130.92.64.20]) by asterix.unibe.ch (8.12.10+Sun/8.12.10) with ESMTP id k15GmS8Z026592 for ; Sun, 5 Feb 2006 17:48:28 +0100 (MET) Received: (from roth@localhost) by droopy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id k15GmSZp025834 for freebsd-rc@freebsd.org; Sun, 5 Feb 2006 17:48:28 +0100 (MET) Date: Sun, 5 Feb 2006 17:48:28 +0100 From: Tobias Roth To: freebsd-rc@freebsd.org Message-ID: <20060205164828.GA25827@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne Subject: link on freebsd.org search page X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2006 16:48:40 -0000 Hi I just noticed that freebsd-rc is not linked at http://www.freebsd.org/search/search.html#mailinglists cheers, Tobias From owner-freebsd-rc@FreeBSD.ORG Sun Feb 5 21:41:07 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFC5116A420 for ; Sun, 5 Feb 2006 21:41:07 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from mailhub03.unibe.ch (mailhub03.unibe.ch [130.92.9.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3488C43D45 for ; Sun, 5 Feb 2006 21:41:07 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from localhost (scanhub02-eth0.unibe.ch [130.92.254.66]) by mailhub03.unibe.ch (Postfix) with ESMTP id DDBEF2937F for ; Sun, 5 Feb 2006 22:41:05 +0100 (CET) Received: from mailhub03.unibe.ch ([130.92.9.70]) by localhost (scanhub02.unibe.ch [130.92.254.66]) (amavisd-new, port 10024) with LMTP id 13298-11-93 for ; Sun, 5 Feb 2006 22:41:04 +0100 (CET) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub03.unibe.ch (Postfix) with ESMTP id 1621E293B3 for ; Sun, 5 Feb 2006 22:41:04 +0100 (CET) Received: from droopy.unibe.ch (droopy [130.92.64.20]) by asterix.unibe.ch (8.12.10+Sun/8.12.10) with ESMTP id k15Lf48Z013948 for ; Sun, 5 Feb 2006 22:41:04 +0100 (MET) Received: (from roth@localhost) by droopy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id k15Lf4lm026357 for freebsd-rc@freebsd.org; Sun, 5 Feb 2006 22:41:04 +0100 (MET) Date: Sun, 5 Feb 2006 22:41:04 +0100 From: Tobias Roth To: freebsd-rc@freebsd.org Message-ID: <20060205214104.GA26342@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne Subject: rc.d/ramdisk and rc.d/ramdisk-own X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2006 21:41:07 -0000 Hi I find no reference to the two startup scripts rc.d/ramdisk and rc.d/ramdisk-own. I think they should be removed. thanks, t. From owner-freebsd-rc@FreeBSD.ORG Sun Feb 5 22:52:48 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89F9616A420 for ; Sun, 5 Feb 2006 22:52:48 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B19243D45 for ; Sun, 5 Feb 2006 22:52:47 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 78838 invoked by uid 399); 5 Feb 2006 22:52:47 -0000 Received: from localhost (HELO ?192.168.1.102?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 5 Feb 2006 22:52:47 -0000 Message-ID: <43E681BD.3040407@FreeBSD.org> Date: Sun, 05 Feb 2006 14:52:45 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Tobias Roth References: <20060205164828.GA25827@droopy.unibe.ch> In-Reply-To: <20060205164828.GA25827@droopy.unibe.ch> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: link on freebsd.org search page X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2006 22:52:48 -0000 Tobias Roth wrote: > Hi > > I just noticed that freebsd-rc is not linked at > > http://www.freebsd.org/search/search.html#mailinglists Can you please file a doc PR about this issue? Thanks, Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Feb 6 11:02:24 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B49216A420 for ; Mon, 6 Feb 2006 11:02:24 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 156B143D46 for ; Mon, 6 Feb 2006 11:02:24 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k16B2NOW081834 for ; Mon, 6 Feb 2006 11:02:23 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k16B2MWO081827 for freebsd-rc@freebsd.org; Mon, 6 Feb 2006 11:02:22 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 6 Feb 2006 11:02:22 GMT Message-Id: <200602061102.k16B2MWO081827@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2006 11:02:24 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/02/10] conf/77340 rc awk used in /etc/rc.d/nsswitch when not a 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/06/30] conf/68525 rc Loader's verbose boot mode has rc.d/local o [2004/11/11] conf/73834 rc Bad dependencies for /etc/rc.d/savecore o [2004/11/13] conf/73909 rc [patch] rc.d/sshd does not work with port o [2005/02/18] conf/77663 rc Suggestion: add /etc/rc.d/addnetswap afte o [2005/05/14] kern/81006 rc ipnat not working with tunnel interfaces o [2005/08/27] conf/85363 rc syntax error in /etc/rc.d/devfs o [2005/11/14] conf/88974 rc autoconfigured vlans confuse rc.d/netif o [2006/01/30] conf/92523 rc [patch] allow rc scripts to kill process 8 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Feb 6 19:06:29 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BC2316A420 for ; Mon, 6 Feb 2006 19:06:29 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95EEF43D49 for ; Mon, 6 Feb 2006 19:06:28 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k16J6RGD011838; Mon, 6 Feb 2006 11:06:27 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k16J6Rwk011837; Mon, 6 Feb 2006 11:06:27 -0800 Date: Mon, 6 Feb 2006 11:06:27 -0800 From: Brooks Davis To: Tobias Roth Message-ID: <20060206190627.GG26518@odin.ac.hmc.edu> References: <20060205214104.GA26342@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gvF4niNJ+uBMJnEh" Content-Disposition: inline In-Reply-To: <20060205214104.GA26342@droopy.unibe.ch> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-rc@freebsd.org Subject: Re: rc.d/ramdisk and rc.d/ramdisk-own X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2006 19:06:29 -0000 --gvF4niNJ+uBMJnEh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 05, 2006 at 10:41:04PM +0100, Tobias Roth wrote: > Hi >=20 > I find no reference to the two startup scripts rc.d/ramdisk and > rc.d/ramdisk-own. I think they should be removed. Huh? Why should they be removed? While they should be documented, I don't see any reason to remove them. Like most other rc.d scripts they don't do anything unless you configure them so other than eating a few inodes I don't see any harm in keeping them. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --gvF4niNJ+uBMJnEh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFD554yXY6L6fI4GtQRAlaFAJ9WEDmH3wb9etnPEm3yZ4g1NzitDwCg1XmB TVLJsbvOczvX71D5Tmjdb10= =ulHj -----END PGP SIGNATURE----- --gvF4niNJ+uBMJnEh-- From owner-freebsd-rc@FreeBSD.ORG Tue Feb 7 05:30:10 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD62B16A420 for ; Tue, 7 Feb 2006 05:30:10 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.FreeBSD.org (Postfix) with SMTP id 549CD43D45 for ; Tue, 7 Feb 2006 05:30:10 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 96307 invoked by uid 399); 7 Feb 2006 05:30:09 -0000 Received: from localhost (HELO ?192.168.1.102?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 7 Feb 2006 05:30:09 -0000 Message-ID: <43E8305F.9020505@FreeBSD.org> Date: Mon, 06 Feb 2006 21:30:07 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: freebsd-rc@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/mixed; boundary="------------020304020308050203050202" Subject: rc.conf.d support for local_startup directories? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2006 05:30:10 -0000 This is a multi-part message in MIME format. --------------020304020308050203050202 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Howdy, A post on -ports recently, and some other stuff I've been working on got me thinking. Is there any reason not to offer rc.conf.d support in the local_startup directories? I think that this would simplify a lot of issues, port authors could install the file with appropriate defaults, then deinstall it when they are done. No more messy stuff left over after a port is deinstalled. The only disadvantage I can see to this is that because of how the conf sourcing code is written, the variables in a file in an rc.conf.d directory will always override those in /etc/rc.conf[.local]. This could lead to two problems, one would be a potential POLA violation, the other is that there is a convenience factor now in just putting port_enable=yes in /etc/rc.conf.local, and having it still be there after you install the port. If rc.conf.d support became more widespread for ports, then users would have to either re-enable that port at every install, or (more likely) port authors would start enabling their port by default. One could make the argument that this is reasonable behavior, so I'm not sure this is a problem per se, just something to consider. There is at least one way around this problem that I can see off hand, but I thought I'd throw it open for discussion first and see what people think. I've attached the simplest implementation I could think of to start the discussion. Doug -- This .signature sanitized for your protection --------------020304020308050203050202 Content-Type: text/plain; name="local_startup-rc.conf.d-diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="local_startup-rc.conf.d-diff" Index: rc.subr =================================================================== RCS file: /usr/local/ncvs/src/etc/rc.subr,v retrieving revision 1.47 diff -u -r1.47 rc.subr --- rc.subr 10 Dec 2005 20:19:08 -0000 1.47 +++ rc.subr 7 Feb 2006 03:50:33 -0000 @@ -876,10 +876,12 @@ fi _rc_conf_loaded=true fi - if [ -f /etc/rc.conf.d/"$_command" ]; then - debug "Sourcing /etc/rc.conf.d/${_command}" - . /etc/rc.conf.d/"$_command" - fi + for dir in /etc $local_startup; do + if [ -r "${dir%/rc.d}/rc.conf.d/$_command" ]; then + debug "Sourcing ${dir%/rc.d}/rc.conf.d/${_command}" + . "${dir%/rc.d}/rc.conf.d/$_command" + fi + done # XXX - Deprecated variable name support # --------------020304020308050203050202-- From owner-freebsd-rc@FreeBSD.ORG Tue Feb 7 06:13:12 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A262E16A420; Tue, 7 Feb 2006 06:13:12 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 458A243D48; Tue, 7 Feb 2006 06:13:12 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k176DBA4023907; Mon, 6 Feb 2006 22:13:11 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k176DBCx023906; Mon, 6 Feb 2006 22:13:11 -0800 Date: Mon, 6 Feb 2006 22:13:11 -0800 From: Brooks Davis To: Doug Barton Message-ID: <20060207061311.GC8667@odin.ac.hmc.edu> References: <43E8305F.9020505@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="adJ1OR3c6QgCpb/j" Content-Disposition: inline In-Reply-To: <43E8305F.9020505@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-rc@freebsd.org Subject: Re: rc.conf.d support for local_startup directories? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2006 06:13:12 -0000 --adJ1OR3c6QgCpb/j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 06, 2006 at 09:30:07PM -0800, Doug Barton wrote: > Howdy, >=20 > A post on -ports recently, and some other stuff I've been working on got = me > thinking. Is there any reason not to offer rc.conf.d support in the > local_startup directories? I think that this would simplify a lot of issu= es, > port authors could install the file with appropriate defaults, then > deinstall it when they are done. No more messy stuff left over after a po= rt > is deinstalled. What messy stuff? > The only disadvantage I can see to this is that because of how the conf > sourcing code is written, the variables in a file in an rc.conf.d directo= ry > will always override those in /etc/rc.conf[.local]. This could lead to two > problems, one would be a potential POLA violation, the other is that there > is a convenience factor now in just putting port_enable=3Dyes in > /etc/rc.conf.local, and having it still be there after you install the po= rt. > If rc.conf.d support became more widespread for ports, then users would h= ave > to either re-enable that port at every install, or (more likely) port > authors would start enabling their port by default. One could make the > argument that this is reasonable behavior, so I'm not sure this is a prob= lem > per se, just something to consider. Deleting a config file that has modified by the user is wrong, unless we add a really-really-delete option for pkg_delete and new plist directives to go with it. If I had to reconfigure my daemons after each update I'd be really pissed. > There is at least one way around this problem that I can see off hand, bu= t I > thought I'd throw it open for discussion first and see what people think. > I've attached the simplest implementation I could think of to start the > discussion. I really don't like this idea, or at least your proposed use of it. It's exactly the sort of thing we got away from in the base when /etc/default/rc.conf was created. If we want defaults for ports that aren't stuffed into rc.d scripts, we should create ${PREFIX}/etc/defaults/rc.conf.d/. There's something to be said for that since it would left us have /etc/defaults/rc.conf style comments for variables. > Index: rc.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /usr/local/ncvs/src/etc/rc.subr,v > retrieving revision 1.47 > diff -u -r1.47 rc.subr > --- rc.subr 10 Dec 2005 20:19:08 -0000 1.47 > +++ rc.subr 7 Feb 2006 03:50:33 -0000 > @@ -876,10 +876,12 @@ > fi > _rc_conf_loaded=3Dtrue > fi > - if [ -f /etc/rc.conf.d/"$_command" ]; then > - debug "Sourcing /etc/rc.conf.d/${_command}" > - . /etc/rc.conf.d/"$_command" > - fi > + for dir in /etc $local_startup; do > + if [ -r "${dir%/rc.d}/rc.conf.d/$_command" ]; then > + debug "Sourcing ${dir%/rc.d}/rc.conf.d/${_command}" > + . "${dir%/rc.d}/rc.conf.d/$_command" > + fi > + done > =20 > # XXX - Deprecated variable name support > # If we've going to do this, we might consider deprecating local_startup and creating a new local_startup_prefixes or similar to get the etc/rc.d parts of the paths out of the way since we're planning to desupport non-rc.d scripts at some point in the future. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --adJ1OR3c6QgCpb/j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFD6Dp2XY6L6fI4GtQRAuC7AJ4iVa33VomBhSMkwCsHHuYgfxue8wCg14uB /0z81wTP0VZUfMZuLyoPWV0= =hgou -----END PGP SIGNATURE----- --adJ1OR3c6QgCpb/j-- From owner-freebsd-rc@FreeBSD.ORG Thu Feb 9 08:29:29 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4871E16A422 for ; Thu, 9 Feb 2006 08:29:29 +0000 (GMT) (envelope-from jofsama@yahoo.com) Received: from smtp008.mail.ukl.yahoo.com (smtp008.mail.ukl.yahoo.com [217.12.11.62]) by mx1.FreeBSD.org (Postfix) with SMTP id 3137043D6E for ; Thu, 9 Feb 2006 08:29:21 +0000 (GMT) (envelope-from jofsama@yahoo.com) Received: (qmail 23559 invoked from network); 9 Feb 2006 08:29:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=KDjGbbqYftBw7rvMwV59JnwYys4s/u8ajUT2GlmloEGzDAku4SXaazSdx2o3+3YAU+5nrveLse3jfsAK8uqp8l9gPd7kdaS71+L+Yd7q/wXDU31rVFDltjuGvJyKps/QY0FcRb1rp6obwqjQWfpAgRkDoZzr2GU8ffFODMqqxFc= ; Received: from unknown (HELO ?192.168.11.3?) (jofsama@220.96.161.57 with plain) by smtp008.mail.ukl.yahoo.com with SMTP; 9 Feb 2006 08:29:20 -0000 Message-ID: <43EAFDB9.9040106@yahoo.com> Date: Thu, 09 Feb 2006 17:30:49 +0900 From: Jarrod User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: EKPD daemon in /usr/local/etc/rc.d getting killed before login X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 08:29:29 -0000 Dear All, Please tell me if this post should have gone elsewhere. The story goes, in brief, like this: * I have an EPSON PM-730C inkjet printer. Possibly not available outside Japan. * I found and installed the port: /usr/ports/print/pips730 in order to manage the printer's settings (resolution, quality, paper-type, etc.) * This port has, among other things, a daemon called "ekpd" which sits between lpd and the physical port and is responsible for filtering the output appropriately. * The port installs a startup script "ekpd.sh", in /usr/local/etc/rc.d by default, which can be enabled with the flag "ekpd_enable="YES"" in /etc/rc.conf. The problem was that the daemon would start ok (trace statements proved this), but then terminate as soon as the login prompt came up. Trace statements in the script file and in the ekpd executable file itself, eventually led me to discover that the daemon was somehow being killed off (or dying) once the /etc/rc system had finished booting FreeBSD. Looking around at some of the system daemons I ended up taking a leaf out of lpd.c and changing the daemon's startup code from doing a regular "fork()" to doing a "daemon(0, 0)" call instead. At this stage it looks like the problem is solved. My question is: Is there some documentation or warning somewhere which would have aided me in resolving this problem? I read all the material I could find on the rc.d system and but I didn't see anything that suggested just doing a regular fork() would get you in trouble. I assume the problem has something to do with why the "daemon()" function exists in the first place? Is there any possibility that there could be a check somewhere in the rc system or ports system to prevent programs that don't call "daemon()" to initialize from being installed in rc.d? Thanks in advance for any and all feedback. Yours Sincerely, Jarrod. From owner-freebsd-rc@FreeBSD.ORG Fri Feb 10 08:56:26 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 004BD16A420 for ; Fri, 10 Feb 2006 08:56:25 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A67643D7E for ; Fri, 10 Feb 2006 08:56:15 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id k1A8u74u094757; Fri, 10 Feb 2006 11:56:07 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id k1A8u7cq094756; Fri, 10 Feb 2006 11:56:07 +0300 (MSK) (envelope-from yar) Date: Fri, 10 Feb 2006 11:56:07 +0300 From: Yar Tikhiy To: Jarrod Message-ID: <20060210085607.GF66940@comp.chem.msu.su> References: <43EAFDB9.9040106@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43EAFDB9.9040106@yahoo.com> User-Agent: Mutt/1.5.9i Cc: freebsd-rc@freebsd.org Subject: Re: EKPD daemon in /usr/local/etc/rc.d getting killed before login X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2006 08:56:26 -0000 On Thu, Feb 09, 2006 at 05:30:49PM +0900, Jarrod wrote: > > Dear All, > > Please tell me if this post should have gone elsewhere. > > The story goes, in brief, like this: > > * I have an EPSON PM-730C inkjet printer. Possibly not available outside > Japan. > > * I found and installed the port: /usr/ports/print/pips730 in order to > manage the printer's settings (resolution, quality, paper-type, etc.) > > * This port has, among other things, a daemon called "ekpd" which sits > between lpd and the physical port and is responsible for filtering the > output appropriately. > > * The port installs a startup script "ekpd.sh", in /usr/local/etc/rc.d > by default, which can be enabled with the flag "ekpd_enable="YES"" in > /etc/rc.conf. > > The problem was that the daemon would start ok (trace statements proved > this), but then terminate as soon as the login prompt came up. > > Trace statements in the script file and in the ekpd executable file > itself, eventually led me to discover that the daemon was somehow being > killed off (or dying) once the /etc/rc system had finished booting FreeBSD. > > Looking around at some of the system daemons I ended up taking a leaf > out of lpd.c and changing the daemon's startup code from doing a regular > "fork()" to doing a "daemon(0, 0)" call instead. > > At this stage it looks like the problem is solved. > > My question is: Is there some documentation or warning somewhere which > would have aided me in resolving this problem? Perhaps the ekpd daemon hits some configuration/communication problems and chooses to terminate? Most daemons can log their activity, so you may want to investigate if it is possible by means of a configuration file or command-line arguments to tell ekpd to log its actions to a file or to a syslog facility. In the latter case (syslog) you'll need to make sure that the facility used really gets logged to a file -- see syslog(8) and syslog.conf(5). > I read all the material I could find on the rc.d system and but I didn't > see anything that suggested just doing a regular fork() would get you in > trouble. I assume the problem has something to do with why the > "daemon()" function exists in the first place? > > Is there any possibility that there could be a check somewhere in the rc > system or ports system to prevent programs that don't call "daemon()" to > initialize from being installed in rc.d? This is hardly possible. The only case I can think of is when a program forks into background and then tries to do terminal IO -- it will receive a signal. The daemon() function closes standard IO descriptors and thus prevents the program from doing any IO on them later. If this is the case, ekpd will die if started manually by running "/usr/local/etc/rc.d/ekpd start", too. -- Yar