From owner-freebsd-rc@FreeBSD.ORG Mon Oct 11 11:02:04 2004 Return-Path: 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 75AEA16A4D9 for ; Mon, 11 Oct 2004 11:02:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69FBA43D53 for ; Mon, 11 Oct 2004 11:02:04 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9BB24SZ078732 for ; Mon, 11 Oct 2004 11:02:04 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9BB23BB078726 for freebsd-rc@freebsd.org; Mon, 11 Oct 2004 11:02:03 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 11 Oct 2004 11:02:03 GMT Message-Id: <200410111102.i9BB23BB078726@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 Subject: Current problem reports assigned to you X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Oct 2004 11:02:04 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2004/03/09] kern/63954 rc devfs loses permissions 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/08/29] conf/56144 rc [PATCH] /etc/rc.d/ipmon, /etc/rc.d/ipfilt o [2004/06/30] conf/68525 rc Loader's verbose boot mode has rc.d/local o [2004/07/07] conf/68745 rc /etc/rc.d/devfs runs after ntpd so links 3 problems total. From owner-freebsd-rc@FreeBSD.ORG Thu Oct 14 15:04:27 2004 Return-Path: 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 B412D16A4CE for ; Thu, 14 Oct 2004 15:04:27 +0000 (GMT) Received: from telecom.net.et (sparrow1.telecom.net.et [213.55.64.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4A2843D2D for ; Thu, 14 Oct 2004 15:04:24 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.82] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 60012701; Thu, 14 Oct 2004 17:57:03 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id 44E42B87C; Thu, 14 Oct 2004 13:04:30 +0300 (EAT) Date: Thu, 14 Oct 2004 13:04:30 +0300 From: Mike Makonnen To: Brooks Davis Message-ID: <20041014100429.GA1626@rogue.acs.lan> References: <20041008223214.GA4501@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008223214.GA4501@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: rc@freebsd.org Subject: Re: review request: early rc.d scripts X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 14 Oct 2004 15:04:27 -0000 Sorry for the late reply. I meant to reply to this sooner but forgot about it. I generally don't like multiple runs of rcorder(8) since this can potentially make the system fragile. This is because an early script gets run twice, and if the script doesn't do sanity checking the second time round it could break things (rc.d/var comes to mind). I realize that the keyword is currently only in two rc.d scripts, but having the functionality available invites use in other scripts. Secondly, this seems to me to be of limited use to the majority of FreeBSD users. I can't think of a single instance in the past where I wished I had this functionality. However, you certainly want it, so there will probably be others that could use it too :-) Given my reservations I would really prefer you keep it as a local hack or find a different mechanism. However, if you really want it in the base system it should be behind an rc.conf knob that defaults to off so that those people who don't use it won't be affected by it. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-rc@FreeBSD.ORG Fri Oct 15 10:40:21 2004 Return-Path: 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 0048D16A4CE for ; Fri, 15 Oct 2004 10:40:20 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7CF743D2F for ; Fri, 15 Oct 2004 10:40:18 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.45] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 60092072; Fri, 15 Oct 2004 13:33:07 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id EFA71B87C; Fri, 15 Oct 2004 13:39:40 +0300 (EAT) Date: Fri, 15 Oct 2004 13:39:40 +0300 From: Mike Makonnen To: Brooks Davis Message-ID: <20041015103940.GA4766@rogue.acs.lan> References: <20041005232714.GA18350@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041005232714.GA18350@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: rc@freebsd.org Subject: Re: Review request: fixing /usr dependencies in rc.d/var X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 15 Oct 2004 10:40:21 -0000 Again, sorry for the late reply. On Tue, Oct 05, 2004 at 04:27:14PM -0700, Brooks Davis wrote: > I'm trying to get the /usr dependencies out of rc.d/var. The patch > below does everything except dealing with mtree (I think we're going to > end up moving mtree to /sbin). This change causes two behavior changes. > > - If you delete one of the files now marked with a C, it will come > right back next time you boot unless you remove the C. I don't think > this is a big deal, but it may bite a user or two if they don't use > mergemaster or read UPDATING. > > - Second, if you are booting diskless, only the files marked with C's > or those created elsewhere (wtmp, lastlog, sendmail.st) will be > created at boot instead of all the files. The old behavior can be > returned by adding C's to the flags or change newsyslog_flags to -CCN. > > Any comments? Sounds good to me. > > # PROVIDE: newsyslog > -# REQUIRE: mountcritremote sysdb > -# BEFORE: syslogd SERVERS > +# REQUIRE: cleanvar mountcritremote > +# BEFORE: syslogd > +# KEYWORD: FreeBSD > > . /etc/rc.subr > > name="newsyslog" > -rcvar=$name > +start_cmd=${newsyslog_program} You don't need a start_cmd if all you're doing is calling the command itself. Furthermore, you don't need to explicitly set $newsyslog_program. rc.subr(8) will pick it up automatically (it automatically picks up ${name}_program). > ==== //depot/user/brooks/cleanup/etc/rc.d/sendmail#6 (text+ko) ==== > > @@ -69,6 +69,10 @@ > "${name}: /etc/mail/aliases.db not present, generating" > /usr/bin/newaliases > fi > + > + if [ ! -f "/var/log/sendmail.st" ]; then > + /usr/bin/touch /var/log/sendmail.st > + fi > } > > run_rc_command "$1" > > ==== //depot/user/brooks/cleanup/etc/rc.d/sysdb#2 (text+ko) ==== > > @@ -30,6 +30,15 @@ > # not be available then (possibly no /usr). > # > install -c -m 664 -g utmp /dev/null /var/run/utmp > + > + # Make sure lastlog wtmp exist. They might not be there if > + # we are booting diskless. > + if [ ! -f /var/log/lastlog ]; then > + install -m 644 /dev/null /var/log/lastlog > + fi > + if [ ! -f /var/log/wtmp ]; then > + install -m 644 /dev/null /var/log/wtmp > + fi > } > > load_rc_config $name What's sendmail.st? The rc.d/sysdb script is not used in FreeBSD, so you can probably get rid of the two above patches. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon ! From owner-freebsd-rc@FreeBSD.ORG Sat Oct 16 01:33:20 2004 Return-Path: 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 CEFFE16A4CE for ; Sat, 16 Oct 2004 01:33:20 +0000 (GMT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62C1443D41 for ; Sat, 16 Oct 2004 01:33:20 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (12-243-118-80.kaptech.net [80.118.243.12]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id 21B04157574; Sat, 16 Oct 2004 03:56:47 +0200 (CEST) Message-ID: <03e801c4b320$1dd15540$7890a8c0@gits.invalid> From: "Cyrille Lefevre" To: "Mike Makonnen" , "Brooks Davis" References: <20041005232714.GA18350@odin.ac.hmc.edu> <20041015103940.GA4766@rogue.acs.lan> Date: Sat, 16 Oct 2004 03:33:17 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 cc: rc@freebsd.org Subject: Re: Review request: fixing /usr dependencies in rc.d/var X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 16 Oct 2004 01:33:21 -0000 "Mike Makonnen" wrote: [snip] > > ==== //depot/user/brooks/cleanup/etc/rc.d/sendmail#6 (text+ko) ==== > > > > @@ -69,6 +69,10 @@ > > "${name}: /etc/mail/aliases.db not present, generating" > > /usr/bin/newaliases > > fi > > + > > + if [ ! -f "/var/log/sendmail.st" ]; then > > + /usr/bin/touch /var/log/sendmail.st > > + fi > > } > > > > run_rc_command "$1" > > [snip] > What's sendmail.st? The rc.d/sysdb script is not used in FreeBSD, so you from /usr/share/sendmail/cf/README : STATUS_FILE [/etc/mail/statistics] The file containing status information. under FreeBSD, it's /var/log/sendmail.st instead of /etc/mail/statistics (see /usr/share/sendmail/ostype/freebsd5.m4 for details). see also, man 8 mailstats Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-rc@FreeBSD.ORG Sat Oct 16 04:22:49 2004 Return-Path: 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 8102216A4CE for ; Sat, 16 Oct 2004 04:22:49 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BB9943D2F for ; Sat, 16 Oct 2004 04:22:49 +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 i9G4MoBl005418; Fri, 15 Oct 2004 21:22:50 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i9G4Mndp005417; Fri, 15 Oct 2004 21:22:49 -0700 Date: Fri, 15 Oct 2004 21:22:49 -0700 From: Brooks Davis To: Mike Makonnen Message-ID: <20041016042249.GA5160@odin.ac.hmc.edu> References: <20041005232714.GA18350@odin.ac.hmc.edu> <20041015103940.GA4766@rogue.acs.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <20041015103940.GA4766@rogue.acs.lan> 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: rc@freebsd.org Subject: Re: Review request: fixing /usr dependencies in rc.d/var X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 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, 16 Oct 2004 04:22:49 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 15, 2004 at 01:39:40PM +0300, Mike Makonnen wrote: > Again, sorry for the late reply. >=20 >=20 > On Tue, Oct 05, 2004 at 04:27:14PM -0700, Brooks Davis wrote: > > I'm trying to get the /usr dependencies out of rc.d/var. The patch > > below does everything except dealing with mtree (I think we're going to > > end up moving mtree to /sbin). This change causes two behavior changes. > >=20 > > - If you delete one of the files now marked with a C, it will come > > right back next time you boot unless you remove the C. I don't think > > this is a big deal, but it may bite a user or two if they don't use > > mergemaster or read UPDATING. > >=20 > > - Second, if you are booting diskless, only the files marked with C's > > or those created elsewhere (wtmp, lastlog, sendmail.st) will be > > created at boot instead of all the files. The old behavior can be > > returned by adding C's to the flags or change newsyslog_flags to -CCN. > >=20 > > Any comments? >=20 > Sounds good to me. >=20 > > =20 > > # PROVIDE: newsyslog > > -# REQUIRE: mountcritremote sysdb > > -# BEFORE: syslogd SERVERS > > +# REQUIRE: cleanvar mountcritremote > > +# BEFORE: syslogd > > +# KEYWORD: FreeBSD > > =20 > > . /etc/rc.subr > > =20 > > name=3D"newsyslog" > > -rcvar=3D$name > > +start_cmd=3D${newsyslog_program} >=20 > You don't need a start_cmd if all you're doing is calling the > command itself. Furthermore, you don't need to explicitly set > $newsyslog_program. rc.subr(8) will pick it up automatically (it > automatically picks up ${name}_program). I've new a new version of this that does use a real start command (it's more like the previous version). > > =3D=3D=3D=3D //depot/user/brooks/cleanup/etc/rc.d/sendmail#6 (text+ko) = =3D=3D=3D=3D > >=20 > > @@ -69,6 +69,10 @@ > > "${name}: /etc/mail/aliases.db not present, generating" > > /usr/bin/newaliases > > fi > > + > > + if [ ! -f "/var/log/sendmail.st" ]; then > > + /usr/bin/touch /var/log/sendmail.st > > + fi > > } > > =20 > > run_rc_command "$1" > >=20 > > =3D=3D=3D=3D //depot/user/brooks/cleanup/etc/rc.d/sysdb#2 (text+ko) =3D= =3D=3D=3D > >=20 > > @@ -30,6 +30,15 @@ > > # not be available then (possibly no /usr). > > # > > install -c -m 664 -g utmp /dev/null /var/run/utmp > > + > > + # Make sure lastlog wtmp exist. They might not be there if > > + # we are booting diskless. > > + if [ ! -f /var/log/lastlog ]; then > > + install -m 644 /dev/null /var/log/lastlog > > + fi > > + if [ ! -f /var/log/wtmp ]; then > > + install -m 644 /dev/null /var/log/wtmp > > + fi > > } > > =20 > > load_rc_config $name >=20 > What's sendmail.st? The rc.d/sysdb script is not used in FreeBSD, so you > can probably get rid of the two above patches. It's the sendmail statistics file. rc.d/sysdb needs to run in a diskless environment. If it isn't running now I will enable it. There are scripts that depend on it. Having a utmp, lastlog, and wtmp is non-optional. -- 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 --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBcKIZXY6L6fI4GtQRArRkAJ9xEPzXY5tL6zh/fAIKRwP25CjAowCaAjOj Lfe6ziamQyJpAWakiApPqjA= =/acM -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--