From owner-freebsd-arch@freebsd.org Mon Sep 25 15:18:59 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 37E5FE18559 for ; Mon, 25 Sep 2017 15:18:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F066D82802 for ; Mon, 25 Sep 2017 15:18:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id m103so10025667iod.13 for ; Mon, 25 Sep 2017 08:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=EKzR+axI2hzFvyYBkdSXgUzS+GFZYdZ1F5FassZVCc8=; b=yLpM8eah8yh6y/tuagOEimFhp5x+jDOsGKugIMjoyzTRru+JNmnneU2Mkp2+KyNGQX mRS8+ULrlXEC2vlUnDs5TIfb/Dn1nHCXUKJ4XrFpg6VuIQklbTNXbwStlCXLlAjL8f+I TEVNX4NZF7+jttp3/VqTneQXEfKYZSbDP5RguvhmvhOsE1W/lWl/7CXIfHCxIqP50MlL 3O58bL9EtoASbGhjizeHfTRiJRszjJ/TujhPwY44odEnBg0nROMbCksFd6byQv4Dp8rg ut0yX7XNWDa7hHYGemNrLK2qKnLbhtEmMPz5cxGc63GOLaFXEJIum1YjPUbrB+WTwSit jRBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=EKzR+axI2hzFvyYBkdSXgUzS+GFZYdZ1F5FassZVCc8=; b=GvUahy1U7itnqXaIuGnzYwGjVsMVWX+Dge64r8T43mAhwrsP+1O8801FajbZV2PdO7 Ro9wG1mbKpgkwvdhup39TtLG4KfCoytciJt0OBYrLgKXUr3AdQo2GSxAyiJ8nFFTwnpv JT9vsFXYy/eIOZnx+BJu4/XGf8/qepKTbiqYYfZ2RniWHcZvuA/VsMvgIEJ/mhhUc1vH V4uh9UavMtj8MwxX30Gm4QXlzmLHVkBC9eN7T4jMkWpysM1aSPuKtn4U5MM0rOPMsyS6 RAG8pIIWUIVtNAPtOEvUSELDW55DH2lgRqITqrGUdaxZaLcaDZ8DTXr5yN84ExVKwgKJ WkmA== X-Gm-Message-State: AHPjjUhr8SjXFePOTkhh60rNJJN0ghMs3SWLpK2BHQ4zYRd5VXgAs9lH D9kMlbiXmUTQst7nzaFSifqbJ1cTLJNLoCK4i3IAdA== X-Google-Smtp-Source: AOwi7QBPMh/we5N5IonkF7q0ps5n0D2j+qa2zsYPTyc3DJBd2+InnQgYuzcizNgjlXxKTggXfy3M2PL0QH8MA/OBNPM= X-Received: by 10.107.7.161 with SMTP id g33mr9464413ioi.169.1506352738186; Mon, 25 Sep 2017 08:18:58 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Mon, 25 Sep 2017 08:18:57 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:78f4:43db:b652:bfa7] In-Reply-To: <1506349681.73082.124.camel@freebsd.org> References: <1506349681.73082.124.camel@freebsd.org> From: Warner Losh Date: Mon, 25 Sep 2017 09:18:57 -0600 X-Google-Sender-Auth: VN0Lb1KJRJIkk-G3i6e_SqSVDsY Message-ID: Subject: Re: rc.d scripts and rc.conf variable defaults To: Ian Lepore Cc: "freebsd-arch@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 15:18:59 -0000 On Mon, Sep 25, 2017 at 8:28 AM, Ian Lepore wrote: > 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? > When /etc/defaults/rc.conf was created, the standard was everything belongs there to protect the user from default churn. > 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. > Yes, it was implemented that way a long time ago, but there was a switch to a list of rc files to read at some point and the docs weren't updated. > 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? > IMHO, yes. It's certainly was the intent when this stuff was invented. Warner