Date: Fri, 15 Oct 2004 21:22:49 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Mike Makonnen <mtm@identd.net> Cc: rc@freebsd.org Subject: Re: Review request: fixing /usr dependencies in rc.d/var Message-ID: <20041016042249.GA5160@odin.ac.hmc.edu> In-Reply-To: <20041015103940.GA4766@rogue.acs.lan> References: <20041005232714.GA18350@odin.ac.hmc.edu> <20041015103940.GA4766@rogue.acs.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Oct 15, 2004 at 01:39:40PM +0300, Mike Makonnen wrote:
> 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).
I've new a new version of this that does use a real start command (it's
more like the previous version).
> > ==== //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.
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
--
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFBcKIZXY6L6fI4GtQRArRkAJ9xEPzXY5tL6zh/fAIKRwP25CjAowCaAjOj
Lfe6ziamQyJpAWakiApPqjA=
=/acM
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041016042249.GA5160>
