Skip site navigation (1)Skip section navigation (2)
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

--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--


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041016042249.GA5160>