Date: Mon, 25 Sep 2017 08:28:01 -0600 From: Ian Lepore <ian@freebsd.org> To: "freebsd-arch@FreeBSD.org" <freebsd-arch@FreeBSD.org> Subject: rc.d scripts and rc.conf variable defaults Message-ID: <1506349681.73082.124.camel@freebsd.org>
next in thread | raw e-mail | index | archive | help
We have about 165 scripts in etc/rc.d. 22 of them handle their own
default values for configuration variables using ${var:=default} or
${var:-default}. Presumably all the others rely on defaults/rc.conf
providing the default values.
Is there a standard, written or not, covering this?
rc.conf(5) says that defaults/rc.conf is the thing that includes your
/etc/rc.conf, and that would certainly guarantee that the system-
provided defaults are in place, but the current implementation doesn't
actually work that way. rc.subr is currently forgiving of a missing
defaults file.
I'd prefer that the system rc.d scripts relied on defaults/rc.conf
alone and individual rc.d scripts not be cluttered up with :- syntax.
While rc.conf(5) strongly implies the file is required, it doesn't
exactly say so. Should it?
-- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1506349681.73082.124.camel>
