From owner-freebsd-arch@freebsd.org Mon Sep 25 14:28:09 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12ED3E1717C for ; Mon, 25 Sep 2017 14:28:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECF1080188 for ; Mon, 25 Sep 2017 14:28:08 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bdf376b9-a1fd-11e7-a937-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id bdf376b9-a1fd-11e7-a937-4f970e858fdb; Mon, 25 Sep 2017 14:28:04 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8PES1nE003398 for ; Mon, 25 Sep 2017 08:28:01 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1506349681.73082.124.camel@freebsd.org> Subject: rc.d scripts and rc.conf variable defaults From: Ian Lepore To: "freebsd-arch@FreeBSD.org" Date: Mon, 25 Sep 2017 08:28:01 -0600 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 14:28:09 -0000 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