From owner-freebsd-rc@FreeBSD.ORG Mon Dec 2 19:25:37 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 205C0A9 for ; Mon, 2 Dec 2013 19:25:37 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id A4BA61E62 for ; Mon, 2 Dec 2013 19:25:36 +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=GxPL7yp0mrRzpiBYBdJxg1FBZvI=; b=CaUiEb4YuYq9sRcMxJ 0R2pfflHQTu7KNNMm3g7WBPL3GfOHM4nV1mj1iPT4OH+U08upGwc/0WKstEThroF tQWJBCQCuUjfIRgiIqDoWjXgDxaq7PFe+yzKRo++rF3xg4SDiWVpWcI19Wqqkcgc mfjKwGxnFqKPUemSFu6T51Ey4= Received: by mf135.sendgrid.net with SMTP id mf135.37289.529CDEAFA Mon, 02 Dec 2013 19:25:35 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.13]) by mi41 (SG) with ESMTP id 142b4c5dec7.2252.14e2b68 for ; Mon, 02 Dec 2013 13:25:35 -0600 (CST) Received: (qmail 32281 invoked from network); 2 Dec 2013 19:25:34 -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:25:34 -0000 Received: (qmail 24658 invoked from network); 2 Dec 2013 19:22:56 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 2 Dec 2013 19:22:56 -0000 Message-ID: <529CDE10.9070405@freebsd.org> Date: Mon, 02 Dec 2013 11:22:56 -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: Hiroki Sato 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> <20131203.040524.1967340345792909822.hrs@allbsd.org> In-Reply-To: <20131203.040524.1967340345792909822.hrs@allbsd.org> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: ChUA/E68MWtQtYrYVmEHIGuqNmShXrFL3cq8iGM7RqX9GJIOSIEJz3WyotblMArAbzOMsAat3gpbgTjdGNPxQrCMTV857l1tx0bwcV5C2aTjG6cCzk6eBd5agEu5Hjx+L5laTMjGlBmGIBz8tr6eoabG3Kj2CSQxdJNFosSm9tw= Cc: freebsd-rc@FreeBSD.org 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:25:37 -0000 On 12/02/13 11:05, Hiroki Sato wrote: > So, if I understand it correctly, the ec2-scripts add > $firstboot_pkgs_enable and $firstboot_pkgs_list into /etc/rc.conf and then > send a signal to /etc/rc, and then the firstboot-pkg script runs. s/and then/and at some point later/ The firstboot-pkgs script running isn't trigerred by the signal; it's just another rc.d script. And there's other things which could be configured by launch-time user-data, e.g., firstboot_freebsd_update_enable="NO" if someone didn't want their EC2 image to freebsd-update itself. > In this case, I think creating /etc/rc.conf.d/firstboot-pkg in ec2-scripts > is simpler. Sourcing /etc/rc.conf happens only once, but sourcing > /etc/rc.conf.d/ happens every time when "load_rc_config " is > called. If firstboot-pkgs calls load_rc_config, it should work as expected > without sending a signal. That's a workaround, but I think it's less than ideal from a usability perspective -- FreeBSD users expect to edit /etc/rc.conf, and vanishingly few people even know that /etc/rc.conf.d/ exists. The idea here is to provide a general mechanism for creating and adding to configuration files with data provided at VM launch time, and trying to explain to people that editing /etc/rc.conf won't do what they expect seems like it would be difficult. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid