From owner-freebsd-rc@FreeBSD.ORG Mon Dec 2 19:31:31 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F6D265 for ; Mon, 2 Dec 2013 19:31:31 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 84A631ED7 for ; Mon, 2 Dec 2013 19:31:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=Mfv543roGn9IQRdf+AhToox4fh8=; b=tfdY9O9Ef1xz/iBvGQ KK/jY9QjZUhgWwHz4cCyrnrvk9wODv9ayH/3Y8zd6nz+Z8oOA5g5QzT4S72a6Cqs Unm1SyOCjm2vvsy9WFrrRG22a+tE14G5IubYMZT6MXrHvM1eLrGQWzG+OsmLq/lA p9oC7HXEM/QdXxQqZGRRIyzBA= Received: by mf44.sendgrid.net with SMTP id mf44.10914.529CE00A4 Mon, 02 Dec 2013 19:31:22 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.15]) by mi36 (SG) with ESMTP id 142b4cb274b.6bb.16802be for ; Mon, 02 Dec 2013 13:31:22 -0600 (CST) Received: (qmail 32466 invoked from network); 2 Dec 2013 19:31:20 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 2 Dec 2013 19:31:20 -0000 Received: (qmail 24683 invoked from network); 2 Dec 2013 19:28:37 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 2 Dec 2013 19:28:37 -0000 Message-ID: <529CDF65.7000406@freebsd.org> Date: Mon, 02 Dec 2013 11:28:37 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Devin Teske Subject: Re: RFC: support for re-sourcing /etc/rc.conf References: <529BEDDB.8010003@freebsd.org> <20131202.214853.1540734630471865242.hrs@allbsd.org> <529CD535.5010903@freebsd.org> <9EF48D5E-2706-4628-BF7B-DBBD5D7E227F@fisglobal.com> In-Reply-To: <9EF48D5E-2706-4628-BF7B-DBBD5D7E227F@fisglobal.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: ChUA/E68MWtQtYrYVmEHIGuqNmShXrFL3cq8iGM7RqUef0xzUKgMIZGl/E2gt58RGqEYi7G5ERXm6uiZfTYqtBLxoYmiCTsvBimEWIDn7PM5TZYsosVSOmnnKW4FKUSL6nQK6C6aK0MmPaXhD6y1PVKqPwgCjbhX6mxl4n6IVgY= Cc: FreeBSD RC X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 19:31:31 -0000 On 12/02/13 11:17, Teske, Devin wrote: > On Dec 2, 2013, at 10:45 AM, Colin Percival wrote: >> No, the other way around -- a different script (part of ec2-scripts) updates >> /etc/rc.conf based on metadata provided at VM launch time. One use of this >> would be to set firstboot_pkgs_* variables to control the behaviour of the >> firstboot-pkgs port moments later in the boot process. > > sysrc(8) in 9.2+ base comes to mind. > NB: Available as a port for older releases 4.8+ (sysutils/sysrc) I should have been clearer, the VM launch user-data could specify any files to modify; it just happens that rc.conf is a problem because it's over-aggressively cached. >> 3. Early in the boot process, ec2-scripts reads that user-data, updates >> /etc/rc.conf, and signals /etc/rc. >> 4. /etc/rc re-sources /etc/rc.conf. > > Cool. How's the signaling in #3 done to get #4? My (one line plus comments) patch teaches rc to re-source rc.conf if it receives a SIGALRM. > I like the idea of firstboot_pkgs_* Great. It's in the ports tree, sysutils/firstboot-pkgs. > I also like Hiroki's idea of stashing it all into rc.conf.d As I mentioned in reply to him, forcing people to use rc.conf.d instead of rc.conf seems like a usability challenge. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid