From owner-freebsd-rc@FreeBSD.ORG Mon Dec 2 12:49:21 2013 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 071ADE36; Mon, 2 Dec 2013 12:49:21 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEE9510AC; Mon, 2 Dec 2013 12:49:16 +0000 (UTC) Received: from alph.d.allbsd.org (p4181-ipbf1307funabasi.chiba.ocn.ne.jp [123.225.173.181]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id rB2CmvSh073639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Dec 2013 21:49:08 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.5) with ESMTP id rB2CmuhM009062; Mon, 2 Dec 2013 21:48:57 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 02 Dec 2013 21:48:53 +0900 (JST) Message-Id: <20131202.214853.1540734630471865242.hrs@allbsd.org> To: cperciva@FreeBSD.org Subject: Re: RFC: support for re-sourcing /etc/rc.conf From: Hiroki Sato In-Reply-To: <529BEDDB.8010003@freebsd.org> References: <529BEDDB.8010003@freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Dec__2_21_48_53_2013_854)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Mon, 02 Dec 2013 21:49:08 +0900 (JST) X-Spam-Status: No, score=-99.1 required=13.0 tests=CONTENT_TYPE_PRESENT, SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org 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 12:49:21 -0000 ----Security_Multipart(Mon_Dec__2_21_48_53_2013_854)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Colin Percival wrote in <529BEDDB.8010003@freebsd.org>: cp> Hi all, cp> cp> I'd like to commit the attached patch to /etc/rc. When SIGALRM is received, cp> it reloads /etc/rc.conf; this makes it possible for an rc.d script to perform cp> first-boot system configuration and have it reflected by other rc.d scripts. cp> cp> In particular, this will allow me to provide EC2 user-data of cp> >>/etc/rc.conf cp> firstboot_pkgs_enable="YES" cp> firstboot_pkgs_list="apache22" cp> to an image with the sysutils/ec2-scripts and sysutils/firstboot-pkgs ports cp> installed, and have a system running with apache22 installed moments later. cp> cp> The first signal which came to mind for this was SIGHUP, since that's used cp> by many daemons for "reload configuration file", but for some reason that cp> signal never arrives at /etc/rc -- so I switched to SIGALRM, which works cp> just fine. cp> cp> I'd like to get this into the tree as soon as possible in order to maximize cp> my odds of convincing re@ that "rc.conf can't be re-sourced after it has been cp> modified during boot" is a bug which should be fixed in 10.0-RELEASE. cp> cp> Comments? I am not familiar with sysutils/firstboot-pkgs and its use case, but is it correct that packages are installed during /etc/rc and then rc.conf will be updated before rc.d scripts for the installed packages run from /etc/rc? Where and when SIGALRM is sent from? -- Hiroki ----Security_Multipart(Mon_Dec__2_21_48_53_2013_854)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlKcgbUACgkQTyzT2CeTzy2mEQCg1zl2wm9ehmgs7nFLcpy0hGKl nicAn38Jt0gHhaYmfE0g/zYPF0GnhtS0 =V1pk -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Dec__2_21_48_53_2013_854)----