From owner-freebsd-rc@FreeBSD.ORG Sun Feb 12 10:07:12 2006 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8495416A423; Sun, 12 Feb 2006 10:07:12 +0000 (GMT) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 269BF43D49; Sun, 12 Feb 2006 10:07:12 +0000 (GMT) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (matteo@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1CA7CD3063633; Sun, 12 Feb 2006 10:07:12 GMT (envelope-from matteo@freefall.freebsd.org) Received: (from matteo@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1CA7Bq7063629; Sun, 12 Feb 2006 10:07:11 GMT (envelope-from matteo) Date: Sun, 12 Feb 2006 10:07:11 GMT From: Matteo Riondato Message-Id: <200602121007.k1CA7Bq7063629@freefall.freebsd.org> To: research@ijs.co.nz, matteo@FreeBSD.org, freebsd-rc@FreeBSD.org, matteo@FreeBSD.org Cc: Subject: Re: conf/68525: Loader's verbose boot mode has rc.d/localdaemon not name local scripts 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, 12 Feb 2006 10:07:12 -0000 Synopsis: Loader's verbose boot mode has rc.d/localdaemon not name local scripts State-Changed-From-To: open->patched State-Changed-By: matteo State-Changed-When: Sun Feb 12 10:06:31 UTC 2006 State-Changed-Why: Fixed in HEAD Responsible-Changed-From-To: freebsd-rc->matteo Responsible-Changed-By: matteo Responsible-Changed-When: Sun Feb 12 10:06:31 UTC 2006 Responsible-Changed-Why: I will handle the MFC. http://www.freebsd.org/cgi/query-pr.cgi?pr=68525 From owner-freebsd-rc@FreeBSD.ORG Sun Feb 12 23:21:43 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 5BAD916A422 for ; Sun, 12 Feb 2006 23:21:43 +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 999BA43D4C for ; Sun, 12 Feb 2006 23:21:41 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 8737 invoked by uid 399); 12 Feb 2006 23:21:40 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 12 Feb 2006 23:21:40 -0000 Message-ID: <43EFC302.40001@FreeBSD.org> Date: Sun, 12 Feb 2006 15:21:38 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Matteo Riondato References: <200602121004.k1CA4vJG056410@repoman.freebsd.org> In-Reply-To: <200602121004.k1CA4vJG056410@repoman.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, freebsd-rc@freebsd.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, philip@freebsd.org, Craig Carey Subject: Re: cvs commit: src/etc/rc.d localpkg X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-rc@freebsd.org 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, 12 Feb 2006 23:21:43 -0000 Matteo Riondato wrote: > matteo 2006-02-12 10:04:56 UTC > > FreeBSD src repository > > Modified files: > etc/rc.d localpkg > Log: > Make localpkg print local scripts names when the boot is verbose > > PR: conf/68525 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=68525 > Approved by: philip (mentor) > MFC after: 3 days > > Revision Changes Path > 1.8 +3 -0 src/etc/rc.d/localpkg > > http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/rc.d/localpkg.diff?&r1=1.7&r2=1.8&f=h Please hold off on the MFC of this patch till we have a chance to discuss it more. I'm not opposed to the concept of printing out script names as they are executed, but that should be done using one of the existing rc.subr mechanisms (probably debug, as that's how it's done in rc.subr for new style scripts). I'm not asking you to back this out, but I would appreciate it if you'd reply to the -rc list so that we can discuss it further before we move forward. Thanks, Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 00:01:46 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 21D1616A420; Mon, 13 Feb 2006 00:01:46 +0000 (GMT) (envelope-from philip@paeps.cx) Received: from gateway.nixsys.be (gateway.nixsys.be [195.144.77.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C55543D45; Mon, 13 Feb 2006 00:01:45 +0000 (GMT) (envelope-from philip@paeps.cx) Received: from wotan.home.paeps.cx (wotan.home.paeps.cx [IPv6:2001:6f8:32f:10:a00:20ff:fe9b:138c]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "wotan.home.paeps.cx", Issuer "NixSys CA" (verified OK)) by gateway.nixsys.be (Postfix) with ESMTP id 65EBB4070; Mon, 13 Feb 2006 01:01:43 +0100 (CET) Received: from fasolt.home.paeps.cx (fasolt.home.paeps.cx [IPv6:2001:6f8:32f:10:250:fcff:feb3:b725]) by wotan.home.paeps.cx (Postfix) with ESMTP id 92B5961F1; Mon, 13 Feb 2006 01:01:41 +0100 (CET) Received: from fasolt.home.paeps.cx (philip@localhost [127.0.0.1]) by fasolt.home.paeps.cx (8.13.4/8.13.4) with ESMTP id k1D01eA0013864; Mon, 13 Feb 2006 01:01:40 +0100 (CET) (envelope-from philip@fasolt.home.paeps.cx) Received: (from philip@localhost) by fasolt.home.paeps.cx (8.13.4/8.13.4/Submit) id k1D01drZ013863; Mon, 13 Feb 2006 01:01:39 +0100 (CET) (envelope-from philip) Date: Mon, 13 Feb 2006 01:01:38 +0100 From: Philip Paeps To: freebsd-rc@freebsd.org Message-ID: <20060213000138.GF5084@fasolt.home.paeps.cx> Mail-Followup-To: Philip Paeps , Matteo Riondato , Craig Carey , freebsd-rc@freebsd.org References: <200602121004.k1CA4vJG056410@repoman.freebsd.org> <43EFC302.40001@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43EFC302.40001@FreeBSD.org> X-Date-in-Rome: Idus Februarias MMDCCLIX ab Urbe Condida X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879 X-Message-Flag: Get a proper mailclient! Organization: Happily Disorganized User-Agent: Mutt/1.5.11 Cc: Matteo Riondato , Craig Carey Subject: Re: cvs commit: src/etc/rc.d localpkg 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, 13 Feb 2006 00:01:46 -0000 On 2006-02-12 15:21:38 (-0800), Doug Barton wrote: > Matteo Riondato wrote: > > Make localpkg print local scripts names when the boot is verbose > > Please hold off on the MFC of this patch till we have a chance to discuss it > more. I'm not opposed to the concept of printing out script names as they > are executed, but that should be done using one of the existing rc.subr > mechanisms (probably debug, as that's how it's done in rc.subr for new style > scripts). If magic is available in rc.subr, I agree that would be preferable to use in place of the 'echo' used now. Is there a function in rc.subr to take care of the 'if bootverbose then echo foo' entirely? - Philip [cvs lists snipped from Cc, please include me in replies] -- Philip Paeps 100% recycled electrons philip@freebsd.org The amount of wind will vary inversely with the number and experience of the people you have on board. From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 06:50:42 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 00F1C16A420; Mon, 13 Feb 2006 06:50:42 +0000 (GMT) (envelope-from matteo@freebsd.org) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91EFA43D46; Mon, 13 Feb 2006 06:50:41 +0000 (GMT) (envelope-from matteo@freebsd.org) Received: from kaiser.sig11.org (82.50.127.212) by vsmtp3.tin.it (7.2.060.1) id 43EA2D92002F1E78; Mon, 13 Feb 2006 07:51:10 +0100 Received: by kaiser.sig11.org (Postfix, from userid 1000) id 924BB6399; Mon, 13 Feb 2006 07:50:39 +0100 (CET) Date: Mon, 13 Feb 2006 07:50:39 +0100 From: Matteo Riondato To: Philip Paeps , Craig Carey , freebsd-rc@freebsd.org Message-ID: <20060213065039.GC1131@kaiser.sig11.org> References: <200602121004.k1CA4vJG056410@repoman.freebsd.org> <43EFC302.40001@FreeBSD.org> <20060213000138.GF5084@fasolt.home.paeps.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060213000138.GF5084@fasolt.home.paeps.cx> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: cvs commit: src/etc/rc.d localpkg 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, 13 Feb 2006 06:50:42 -0000 On Mon, Feb 13, 2006 at 01:01:38AM +0100, Philip Paeps wrote: > On 2006-02-12 15:21:38 (-0800), Doug Barton wrote: > > Matteo Riondato wrote: > > > Make localpkg print local scripts names when the boot is verbose > > > > Please hold off on the MFC of this patch till we have a chance to discuss it > > more. I'm not opposed to the concept of printing out script names as they > > are executed, but that should be done using one of the existing rc.subr > > mechanisms (probably debug, as that's how it's done in rc.subr for new style > > scripts). > > If magic is available in rc.subr, I agree that would be preferable to use in > place of the 'echo' used now. Is there a function in rc.subr to take care of > the 'if bootverbose then echo foo' entirely? If there's such magic, I'll be glad to modify localpkg and make it using the magic. I'll search for it later, but feel free to make suggestions. Thank you Doug for having pointed this out. Best Regards -- Matteo Riondato FreeBSD Volunteer (http://freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 08:50:14 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 4DEFD16A420 for ; Mon, 13 Feb 2006 08:50:14 +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 F017C43D5D for ; Mon, 13 Feb 2006 08:50:10 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 73649 invoked by uid 399); 13 Feb 2006 08:50:08 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 13 Feb 2006 08:50:08 -0000 Message-ID: <43F0483C.1080708@FreeBSD.org> Date: Mon, 13 Feb 2006 00:50:04 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Matteo Riondato References: <200602121004.k1CA4vJG056410@repoman.freebsd.org> <43EFC302.40001@FreeBSD.org> <20060213000138.GF5084@fasolt.home.paeps.cx> <20060213065039.GC1131@kaiser.sig11.org> In-Reply-To: <20060213065039.GC1131@kaiser.sig11.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Craig Carey , freebsd-rc@freebsd.org, Philip Paeps Subject: Re: cvs commit: src/etc/rc.d localpkg 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, 13 Feb 2006 08:50:14 -0000 Matteo Riondato wrote: > On Mon, Feb 13, 2006 at 01:01:38AM +0100, Philip Paeps wrote: >> On 2006-02-12 15:21:38 (-0800), Doug Barton wrote: >>> Matteo Riondato wrote: >>>> Make localpkg print local scripts names when the boot is verbose >>> Please hold off on the MFC of this patch till we have a chance to discuss it >>> more. I'm not opposed to the concept of printing out script names as they >>> are executed, but that should be done using one of the existing rc.subr >>> mechanisms (probably debug, as that's how it's done in rc.subr for new style >>> scripts). >> If magic is available in rc.subr, I agree that would be preferable to use in >> place of the 'echo' used now. Is there a function in rc.subr to take care of >> the 'if bootverbose then echo foo' entirely? > > If there's such magic, I'll be glad to modify localpkg and make it > using the magic. > I'll search for it later, but feel free to make suggestions. I'm sorry I didn't make myself clear, but what I was actually getting at was that traditionally the kernel boot verbose option and userland stuff like rc.d have been orthogonal. However, it occurs to me that this does not necessarily need to be so. I could see how it might be useful to set rc_debug in rc.subr if the bootverbose sysctl is active. What do others think about this? Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 09:30:08 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 CDA7D16A420 for ; Mon, 13 Feb 2006 09:30:08 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33A2E43D46 for ; Mon, 13 Feb 2006 09:30:08 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: by zproxy.gmail.com with SMTP id i11so932144nzh for ; Mon, 13 Feb 2006 01:30:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=fw3crG3K1s+/e+hdBvdrNN+kaHVktb7hCGCQ1qHVHt2NhwmKonStxerXbV4XyCwATKkeRwsZrHzjISrxutNf1VaOkHbPirSLgbYHXtLdmNaK/nxbi5+MjsARnERJTetDUqieAtY57hGso+SVg8Ovd+YA1NaJcvAavIsB0gLtF84= Received: by 10.36.5.13 with SMTP id 13mr2860746nze; Mon, 13 Feb 2006 01:30:07 -0800 (PST) Received: by 10.36.72.7 with HTTP; Mon, 13 Feb 2006 01:30:07 -0800 (PST) Message-ID: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> Date: Mon, 13 Feb 2006 17:30:07 +0800 From: "Mars G. Miro" To: dougb@FreeBSD.org, freebsd-rc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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, 13 Feb 2006 09:30:08 -0000 Hi there, Today I upgraded a 6.0Rp4 box to RELENG_6 w/c brings it to 6.1-PRERELEASE. This box has a jail w/c has samba (samba-3.0.21a,1) installed and after the usual build{world,kernel}, install{kernel,world}, mergemaster process, I found out that samba would not start during boot. I traced it to /etc/rc.d/localpkg. Reverting this to the 6.0Rp4 version works. I'm no rc guru but seems that 'find_local_scripts_{old|new}' in /etc/rc.subr doesnt actually find the local_startup rc scripts? Thanks and FYI ;-) cheers mars From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 11:02:43 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 C0D8B16A420 for ; Mon, 13 Feb 2006 11:02:43 +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 8423F43D53 for ; Mon, 13 Feb 2006 11:02:43 +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 k1DB2hxT067413 for ; Mon, 13 Feb 2006 11:02:43 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1DB2gZd067407 for freebsd-rc@freebsd.org; Mon, 13 Feb 2006 11:02:42 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 13 Feb 2006 11:02:42 GMT Message-Id: <200602131102.k1DB2gZd067407@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, 13 Feb 2006 11:02:43 -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/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 7 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 19:10: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 4CDA216A420 for ; Mon, 13 Feb 2006 19:10:24 +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 AE1ED43D5C for ; Mon, 13 Feb 2006 19:10:23 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 91449 invoked by uid 399); 13 Feb 2006 19:10:22 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 13 Feb 2006 19:10:22 -0000 Message-ID: <43F0D99D.4060405@FreeBSD.org> Date: Mon, 13 Feb 2006 11:10:21 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: "Mars G. Miro" References: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> In-Reply-To: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> 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: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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, 13 Feb 2006 19:10:24 -0000 Mars G. Miro wrote: > Hi there, > > Today I upgraded a 6.0Rp4 box to RELENG_6 w/c brings it to > 6.1-PRERELEASE. This box has a jail w/c has samba (samba-3.0.21a,1) > installed and after the usual build{world,kernel}, > install{kernel,world}, mergemaster process, I found out that samba > would not start during boot. I traced it to /etc/rc.d/localpkg. > Reverting this to the 6.0Rp4 version works. I'm no rc guru but seems > that 'find_local_scripts_{old|new}' in /etc/rc.subr doesnt actually > find the local_startup rc scripts? The samba boot script is a new style rc.d script, so it will be found by rc.subr, but won't be started unless you have samba_enable=yes in /etc/rc.conf.local (or rc.conf). Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Mon Feb 13 19:30:08 2006 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE90D16A422; Mon, 13 Feb 2006 19:30:08 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC5F143D46; Mon, 13 Feb 2006 19:30:08 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1DJU80G008819; Mon, 13 Feb 2006 19:30:08 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1DJU8gA008815; Mon, 13 Feb 2006 19:30:08 GMT (envelope-from dougb) Date: Mon, 13 Feb 2006 19:30:08 GMT From: Doug Barton Message-Id: <200602131930.k1DJU8gA008815@freefall.freebsd.org> To: nge@cs.hmc.edu, dougb@FreeBSD.org, freebsd-rc@FreeBSD.org, dougb@FreeBSD.org Cc: Subject: Re: conf/73834: Bad dependencies for /etc/rc.d/savecore 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, 13 Feb 2006 19:30:09 -0000 Synopsis: Bad dependencies for /etc/rc.d/savecore State-Changed-From-To: open->closed State-Changed-By: dougb State-Changed-When: Mon Feb 13 19:25:33 UTC 2006 State-Changed-Why: First, it turns out that you can actually recover a dump even after the partition has been swapon'ed. Second, the problem you describe here has been discussed at great length on the freebsd-current mailing list. The short version is that there is a chicken and egg problem. In order to capture the dump, you need a file system to write to. In order to get a file system to write to, you need fsck. In order to allow fsck to run on a memory constrained system, you may need swap. Thus, the current thinking is that the status quo is the best of our current options. Responsible-Changed-From-To: freebsd-rc->dougb Responsible-Changed-By: dougb Responsible-Changed-When: Mon Feb 13 19:25:33 UTC 2006 Responsible-Changed-Why: I'm closing this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=73834 From owner-freebsd-rc@FreeBSD.ORG Tue Feb 14 02:26:16 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 BCA5616A420 for ; Tue, 14 Feb 2006 02:26:16 +0000 (GMT) (envelope-from jofsama@yahoo.com) Received: from smtp004.mail.ukl.yahoo.com (smtp004.mail.ukl.yahoo.com [217.12.11.35]) by mx1.FreeBSD.org (Postfix) with SMTP id 01CCA43D45 for ; Tue, 14 Feb 2006 02:26:15 +0000 (GMT) (envelope-from jofsama@yahoo.com) Received: (qmail 63066 invoked from network); 14 Feb 2006 02:26:14 -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:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qkIv+LRZf5Pe+9OC6GmRVsGOZFUCNomgD0a/rW1ZRLJT3ZPcVRmq7uUzz+nENz5MsJQcb6nqyOEwZJ2ZzxFv5dPGQ+qL1cFhcnaFVUCBSd/xc09JzaS8pTswSPBKUvei6XPeq8FdBYWMg3pUB0+xcAcC8wU9iybFWwrkujATjFQ= ; Received: from unknown (HELO ?192.168.11.3?) (jofsama@220.99.4.57 with plain) by smtp004.mail.ukl.yahoo.com with SMTP; 14 Feb 2006 02:26:14 -0000 Message-ID: <43F1401F.30102@yahoo.com> Date: Tue, 14 Feb 2006 11:27:43 +0900 From: Jarrod User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yar Tikhiy References: <43EAFDB9.9040106@yahoo.com> <20060210085607.GF66940@comp.chem.msu.su> In-Reply-To: <20060210085607.GF66940@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 14 Feb 2006 02:26:17 -0000 Hi Yar, Thanks a lot for you comments. I've inserted some responses below. Yar Tikhiy wrote: >On Thu, Feb 09, 2006 at 05:30:49PM +0900, Jarrod wrote: > > >>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). > > The code for the ekpd daemon does not appear to do much in the way of logging. I put a liberal amount of trace statements in using the syslog command to try and determine where and why it was shutting down, but without much success. >>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. > > Thanks for the help here. I went and had a look at the daemon() function itself: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/daemon.c in the CVS repository. It seems to do three main things as far as I can tell: 1. Catches a signal that (possibly?) gets thrown when the parent exits. 2. Calls the setsid() function. 3. Closes the stdio file descriptors. Since I couldn't see the EKPD daemon doing much IO I decided to play around with the setsid() function. I let EKPD do the usual fork() (taking out my daemon() call) and then did a setsid() straight after. Voila! This seems to work. The daemon no longer bails at the end of startup. I'm not much of an expert on UNIX processes, but is it possible that when the parent shell process running all the scripts in rc.d/ finishes, any child processes that haven't detached, using setsid() or similar, are killed off? From a useability perspective is it worth raising a PR? I just wonder if it might not be nice to have a warning printed up somewhere when you installed a script into the rc.d directory to save newbies (like me) getting unnecessarily frustrated! :) Cheers, Jarrod. From owner-freebsd-rc@FreeBSD.ORG Tue Feb 14 02:41:09 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 4878816A420 for ; Tue, 14 Feb 2006 02:41:09 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAC4C43D48 for ; Tue, 14 Feb 2006 02:41:08 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so1159488nzp for ; Mon, 13 Feb 2006 18:41:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CRzYGAoVo5/jEDD3RXJ7wwaupDAnxOj+0wsa+Y0VswLZExSdJQ3TMf7qyyKYF7P3XsdBhNjuBunstcuoJpWqkM4iojmpB48SP1UlsGpGsBMFvMLcifMjW6HqgbhqtxHTfiFbjgqgw7nnSHCRhdZuFXYiGQa2qGLX39nLgI0Vd14= Received: by 10.36.140.18 with SMTP id n18mr4081277nzd; Mon, 13 Feb 2006 18:41:07 -0800 (PST) Received: by 10.36.72.7 with HTTP; Mon, 13 Feb 2006 18:41:07 -0800 (PST) Message-ID: <28edec3c0602131841w36860880nb7389de31e2e6946@mail.gmail.com> Date: Tue, 14 Feb 2006 10:41:07 +0800 From: "Mars G. Miro" To: Doug Barton In-Reply-To: <43F0D99D.4060405@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> <43F0D99D.4060405@FreeBSD.org> Cc: freebsd-rc@freebsd.org Subject: Re: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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, 14 Feb 2006 02:41:09 -0000 On 2/14/06, Doug Barton wrote: > Mars G. Miro wrote: > > Hi there, > > > > Today I upgraded a 6.0Rp4 box to RELENG_6 w/c brings it to > > 6.1-PRERELEASE. This box has a jail w/c has samba (samba-3.0.21a,1) > > installed and after the usual build{world,kernel}, > > install{kernel,world}, mergemaster process, I found out that samba > > would not start during boot. I traced it to /etc/rc.d/localpkg. > > Reverting this to the 6.0Rp4 version works. I'm no rc guru but seems > > that 'find_local_scripts_{old|new}' in /etc/rc.subr doesnt actually > > find the local_startup rc scripts? > > The samba boot script is a new style rc.d script, so it will be found by > rc.subr, but won't be started unless you have samba_enable=3Dyes in > /etc/rc.conf.local (or rc.conf). > This is the most-recent samba3 and it has the new rc.d script. Of course I have that knob in my /etc/rc.conf: ... # Samba/Winbindd samba_enable=3D"YES" winbindd_enable=3D"YES" # set just for debugging purposes rc_debug=3D"YES" rc_info=3D"YES" ... root@jail:~# ps auxww USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11 /usr/sbin/syslogd -ss root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd root 9212 0.0 0.1 4604 1324 ?? IsJ 4:21PM 0:00.16 /usr/sbin/cron= -s root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd: mars [priv] (sshd) mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd: mars@ttyp1 (sshd) mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh) root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh) root 16596 0.0 0.1 4640 1116 p1 R+J 10:38AM 0:00.00 ps auxww Running the new localpkg rc: root@jail:~# /etc/rc.d/localpkg start /etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_start(). Local package initialization:. Nothing happens: root@jail:~# ps auxww USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11 /usr/sbin/syslogd -ss root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd root 9212 0.0 0.1 4604 1324 ?? SsJ 4:21PM 0:00.16 /usr/sbin/cron= -s root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd: mars [priv] (sshd) mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd: mars@ttyp1 (sshd) mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh) root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh) root 16602 0.0 0.1 4640 1116 p1 R+J 10:38AM 0:00.00 ps auxww However, using the one from 6.0Rp4: root@jail:~# /home/backups/etc/rc.d/localpkg start /home/backups/etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_star= t(). Local package initialization:/usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: samba_enable is set to YES. /usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: nmbd_enable is set to YES. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating nmbd_precmd= (). Starting SAMBA: removing stale tdbs : /var/db/samba/connections.tdb /var/db/samba/messages.tdb /var/db/samba/sessionid.tdb /var/db/samba/unexpected.tdb /var/db/samba/brlock.tdb /var/db/samba/locking.tdb Starting nmbd. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit: /usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf /usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: smbd_enable is set to YES. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating :(). Starting smbd. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit: /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf /usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: winbindd_enable is set to = YES. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating :(). Starting winbindd. /usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit: /usr/local/sbin/winbindd -s /usr/local/etc/smb.conf . It runs: root@jail:~# ps auxww USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 16638 3.0 0.3 23040 6444 ?? SsJ 10:38AM 0:00.02 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf root 16648 3.0 0.3 21048 5764 ?? SJ 10:38AM 0:00.03 /usr/local/sbin/winbindd -s /usr/local/etc/smb.conf root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11 /usr/sbin/syslogd -ss root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd root 9212 0.0 0.1 4604 1324 ?? SsJ 4:21PM 0:00.16 /usr/sbin/cron= -s root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd: mars [priv] (sshd) mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd: mars@ttyp1 (sshd) root 16629 0.0 0.2 18528 4172 ?? SsJ 10:38AM 0:00.01 /usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf root 16647 0.0 0.3 19632 5316 ?? SsJ 10:38AM 0:00.00 /usr/local/sbin/winbindd -s /usr/local/etc/smb.conf root 16649 0.0 0.3 23040 6428 ?? SJ 10:38AM 0:00.00 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh) root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh) root 16650 0.0 0.1 4644 1120 p1 R+J 10:38AM 0:00.00 ps auxww root@jail:~# uname -a FreeBSD jail.XXXXX 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Mon Feb 13 13:06:51 PHT 2006 root@XXXXX:/usr/obj/usr/src/sys/XXXX amd64 Thanks. > Doug > > -- > > This .signature sanitized for your protection > > cheers mars From owner-freebsd-rc@FreeBSD.ORG Tue Feb 14 06:58:38 2006 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4A5616A420; Tue, 14 Feb 2006 06:58:38 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F8BD43D49; Tue, 14 Feb 2006 06:58:38 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1E6wcGG057548; Tue, 14 Feb 2006 06:58:38 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1E6wclZ057544; Tue, 14 Feb 2006 06:58:38 GMT (envelope-from linimon) Date: Tue, 14 Feb 2006 06:58:38 GMT From: Mark Linimon Message-Id: <200602140658.k1E6wclZ057544@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Cc: Subject: Re: conf/93287: [patch] Make rc.subr jail-aware 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, 14 Feb 2006 06:58:39 -0000 Synopsis: [patch] Make rc.subr jail-aware Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Tue Feb 14 06:58:33 UTC 2006 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=93287 From owner-freebsd-rc@FreeBSD.ORG Tue Feb 14 21:04:36 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 EC5DD16A420 for ; Tue, 14 Feb 2006 21:04:36 +0000 (GMT) (envelope-from dougb@freebsd.org) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.200.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AF0243D46 for ; Tue, 14 Feb 2006 21:04:36 +0000 (GMT) (envelope-from dougb@freebsd.org) Received: from [192.168.0.3] (c-24-130-213-251.hsd1.ca.comcast.net[24.130.213.251]) by comcast.net (sccrmhc11) with ESMTP id <20060214210435011001p5s4e>; Tue, 14 Feb 2006 21:04:35 +0000 Message-ID: <43F245E0.3090004@FreeBSD.org> Date: Tue, 14 Feb 2006 13:04:32 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: "Mars G. Miro" References: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> <43F0D99D.4060405@FreeBSD.org> <28edec3c0602131841w36860880nb7389de31e2e6946@mail.gmail.com> In-Reply-To: <28edec3c0602131841w36860880nb7389de31e2e6946@mail.gmail.com> 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: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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, 14 Feb 2006 21:04:37 -0000 Mars G. Miro wrote: > Running the new localpkg rc: > > root@jail:~# /etc/rc.d/localpkg start > /etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_start(). > Local package initialization:. > > Nothing happens: Nor should it. :) Run /usr/local/etc/rc.d/samba.sh start instead. Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Tue Feb 14 23:14:41 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 BFC7616A422 for ; Tue, 14 Feb 2006 23:14:41 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2123843D46 for ; Tue, 14 Feb 2006 23:14:41 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: by zproxy.gmail.com with SMTP id s18so1442229nze for ; Tue, 14 Feb 2006 15:14:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jfI6+8Q9FNsNidfy6Ax2MHgIY2t4J7wEEY7dIYGUjDtvq/B4BsGEqSQg++jfIDzzpA2zepmDbg4X9KxxFO//dZvy3p3PfaWf08RfoPI7/jjXfZcetT2BsOFLdIApp/VBTudTa2EhCAt+wM5Z0OsTY5xP0m022bqY7ds51Fp7GM4= Received: by 10.36.158.18 with SMTP id g18mr5599499nze; Tue, 14 Feb 2006 15:14:40 -0800 (PST) Received: by 10.36.72.7 with HTTP; Tue, 14 Feb 2006 15:14:40 -0800 (PST) Message-ID: <28edec3c0602141514t31f0e846o12ea3bf94ef82d71@mail.gmail.com> Date: Wed, 15 Feb 2006 07:14:40 +0800 From: "Mars G. Miro" To: Doug Barton In-Reply-To: <43F245E0.3090004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> <43F0D99D.4060405@FreeBSD.org> <28edec3c0602131841w36860880nb7389de31e2e6946@mail.gmail.com> <43F245E0.3090004@FreeBSD.org> Cc: freebsd-rc@freebsd.org Subject: Re: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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, 14 Feb 2006 23:14:41 -0000 On 2/15/06, Doug Barton wrote: > Mars G. Miro wrote: > > > Running the new localpkg rc: > > > > root@jail:~# /etc/rc.d/localpkg start > > /etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_start(). > > Local package initialization:. > > > > Nothing happens: > > Nor should it. :) Run /usr/local/etc/rc.d/samba.sh start instead. > The reason why I'm invoking the localpkg rc is that this is where it fails to run scripts in local_startup when the jail starts. If I start it from /usr/local/etc/rc.d/samba.sh, it runs of course, but I'd prefer to have things running during boot (when the jail starts) as opposed to running them manually. Does not happen w/ the previous version of the localpkg rc. > Doug > > -- > > This .signature sanitized for your protection > > cheers mars From owner-freebsd-rc@FreeBSD.ORG Wed Feb 15 01:52:56 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 B9A4D16A420 for ; Wed, 15 Feb 2006 01:52:56 +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 3093443D48 for ; Wed, 15 Feb 2006 01:52:56 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 89858 invoked by uid 399); 15 Feb 2006 01:52:51 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 15 Feb 2006 01:52:51 -0000 Message-ID: <43F28972.5070506@FreeBSD.org> Date: Tue, 14 Feb 2006 17:52:50 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: "Mars G. Miro" References: <28edec3c0602130130t35e1af55y63a5a8b90f1710e@mail.gmail.com> <43F0D99D.4060405@FreeBSD.org> <28edec3c0602131841w36860880nb7389de31e2e6946@mail.gmail.com> <43F245E0.3090004@FreeBSD.org> <28edec3c0602141514t31f0e846o12ea3bf94ef82d71@mail.gmail.com> In-Reply-To: <28edec3c0602141514t31f0e846o12ea3bf94ef82d71@mail.gmail.com> 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: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 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: Wed, 15 Feb 2006 01:52:56 -0000 I have to confess, I only vaguely understand what you're talking about, so sorry if I've got it wrong again. It sounds like the problem you're actually asking about is, "Since I upgraded to 6-stable, things aren't starting in my jails at boot time." If that's what you're actually trying to fix, the solution should be to set the value of early_late_divider in rc.conf _in the jail_ to NETWORKING. If that isn't the problem you're trying to solve, or if that doesn't work for you, please try to restate the problem at a more fundamental level. The localpkg script is no longer relevant. hth, Doug -- This .signature sanitized for your protection From owner-freebsd-rc@FreeBSD.ORG Wed Feb 15 02:16:28 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 CD56916A424 for ; Wed, 15 Feb 2006 02:16:28 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 900DA43D48 for ; Wed, 15 Feb 2006 02:16:26 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: by zproxy.gmail.com with SMTP id x3so215596nzd for ; Tue, 14 Feb 2006 18:16:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=t+O8C0kIMzUF5TkD9QkH6kbn0hT6xbu5XdppHNYLy4gNlvOI9B4KeL2jNP8iTanmGIatIsgG3ArjO+uZeOxGQYPKv6mTjm2k81cbcfNWdjNxgUgMRZVu6KYXDFBJB1H4HfcUFFdzh56HDC6e/I3gojr7E1T3A4h1Efp3fgUZ00s= Received: by 10.36.139.20 with SMTP id m20mr5808333nzd; Tue, 14 Feb 2006 18:16:25 -0800 (PST) Received: by 10.36.72.7 with HTTP; Tue, 14 Feb 2006 18:16:25 -0800 (PST) Message-ID: <28edec3c0602141816t2aece1dai7d73a52adcc0db43@mail.gmail.com> Date: Wed, 15 Feb 2006 10:16:25 +0800 From: "Mars G. Miro" To: Doug Barton MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: freebsd-rc@freebsd.org Subject: Re: 6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3 [FIXED] 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: Wed, 15 Feb 2006 02:16:29 -0000 On 2/15/06, Doug Barton wrote: > I have to confess, I only vaguely understand what you're talking about, s= o > sorry if I've got it wrong again. It sounds like the problem you're actua= lly > asking about is, "Since I upgraded to 6-stable, things aren't starting in= my > jails at boot time." If that's what you're actually trying to fix, the > solution should be to set the value of early_late_divider in rc.conf _in = the > jail_ to NETWORKING. > whoa! That did the trick ;-) Tho that is documented in rc.conf(5), it might be worth documenting it in jail(8) also. I never had to do that before but seems a requirement in 6.1X. Any case, this fixes things for me. > If that isn't the problem you're trying to solve, or if that doesn't work > for you, please try to restate the problem at a more fundamental level. T= he > localpkg script is no longer relevant. > Yes the localpkg script isn't relevant but my initial investigations pointed me to this script (take note using the localpkg script from 6.0 worked), tho I dont have anything to investigate further (as the above fix works) and have other things to do. > hth, > > Doug > Thanks man, you rock! ;-) > -- > > This .signature sanitized for your protection > > cheers mars From owner-freebsd-rc@FreeBSD.ORG Wed Feb 15 11:57:57 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 D460216A420; Wed, 15 Feb 2006 11:57:57 +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 64A0343D45; Wed, 15 Feb 2006 11:57:49 +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 k1FBv6sY097562; Wed, 15 Feb 2006 14:57:06 +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 k1FBv6uk097561; Wed, 15 Feb 2006 14:57:06 +0300 (MSK) (envelope-from yar) Date: Wed, 15 Feb 2006 14:57:05 +0300 From: Yar Tikhiy To: Doug Barton Message-ID: <20060215115705.GL85260@comp.chem.msu.su> References: <200602131930.k1DJU8gA008815@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602131930.k1DJU8gA008815@freefall.freebsd.org> User-Agent: Mutt/1.5.9i Cc: nge@cs.hmc.edu, freebsd-rc@freebsd.org Subject: Re: conf/73834: Bad dependencies for /etc/rc.d/savecore 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: Wed, 15 Feb 2006 11:57:58 -0000 On Mon, Feb 13, 2006 at 07:30:08PM +0000, Doug Barton wrote: > > First, it turns out that you can actually recover a dump > even after the partition has been swapon'ed. Second, the > problem you describe here has been discussed at great > length on the freebsd-current mailing list. The short > version is that there is a chicken and egg problem. In > order to capture the dump, you need a file system to write > to. In order to get a file system to write to, you need > fsck. In order to allow fsck to run on a memory constrained > system, you may need swap. Thus, the current thinking is > that the status quo is the best of our current options. IMHO it's worth to note in addition that one can always arrange a separate dump-only partition if dumps to swap get overwritten due to heavy paging activity during early boot stages, such as fsck of a large file system in small RAM. -- Yar From owner-freebsd-rc@FreeBSD.ORG Sat Feb 18 01:10: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 B29FE16A420 for ; Sat, 18 Feb 2006 01:10:29 +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 9040543D49 for ; Sat, 18 Feb 2006 01:10:25 +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 k1I1AKJO094474; Sat, 18 Feb 2006 04:10:20 +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 k1I1AKtg094473; Sat, 18 Feb 2006 04:10:20 +0300 (MSK) (envelope-from yar) Date: Sat, 18 Feb 2006 04:10:20 +0300 From: Yar Tikhiy To: Jarrod Message-ID: <20060218011020.GD90689@comp.chem.msu.su> References: <43EAFDB9.9040106@yahoo.com> <20060210085607.GF66940@comp.chem.msu.su> <43F1401F.30102@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43F1401F.30102@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: Sat, 18 Feb 2006 01:10:29 -0000 On Tue, Feb 14, 2006 at 11:27:43AM +0900, Jarrod wrote: > Hi Yar, > > Thanks a lot for you comments. I've inserted some responses below. > > Yar Tikhiy wrote: > > >On Thu, Feb 09, 2006 at 05:30:49PM +0900, Jarrod wrote: > > > > > >>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). > > > > > The code for the ekpd daemon does not appear to do much in the way of > logging. I put a liberal amount of trace statements in using the syslog > command to try and determine where and why it was shutting down, but > without much success. > > >>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. > > > > > Thanks for the help here. I went and had a look at the daemon() function > itself: > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/daemon.c > > in the CVS repository. It seems to do three main things as far as I can > tell: > > 1. Catches a signal that (possibly?) gets thrown when the parent exits. > 2. Calls the setsid() function. > 3. Closes the stdio file descriptors. > > Since I couldn't see the EKPD daemon doing much IO I decided to play > around with the setsid() function. I let EKPD do the usual fork() > (taking out my daemon() call) and then did a setsid() straight after. > > Voila! This seems to work. The daemon no longer bails at the end of startup. > > I'm not much of an expert on UNIX processes, but is it possible that > when the parent shell process running all the scripts in rc.d/ finishes, > any child processes that haven't detached, using setsid() or similar, > are killed off? While I don't fully understand this particular case, killing off such child processes is possible. It is documented in _exit(2): o If the process is a controlling process (see intro(2)), the SIGHUP signal is sent to the foreground process group of the controlling terminal, and all current access to the controlling terminal is revoked. Some cases with daemons are considered in PR bin/25462. > From a useability perspective is it worth raising a PR? I just wonder > if it might not be nice to have a warning printed up somewhere when you > installed a script into the rc.d directory to save newbies (like me) > getting unnecessarily frustrated! :) I think that the solution is to add a trivial patch substituting daemon() for fork() in the port. Depending on your free time etc, you may either suggest this in the PR or include the patch in it. A PR is a good idea in any case. -- Yar