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 !