Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Dec 2013 21:48:53 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        cperciva@FreeBSD.org
Cc:        freebsd-rc@FreeBSD.org
Subject:   Re: RFC: support for re-sourcing /etc/rc.conf
Message-ID:  <20131202.214853.1540734630471865242.hrs@allbsd.org>
In-Reply-To: <529BEDDB.8010003@freebsd.org>
References:  <529BEDDB.8010003@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Mon_Dec__2_21_48_53_2013_854)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Colin Percival <cperciva@freebsd.org> 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)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131202.214853.1540734630471865242.hrs>