RFC: support for re-sourcing /etc/rc.conf
Hiroki Sato
hrs at FreeBSD.org
Mon Dec 2 12:49:21 UTC 2013
Colin Percival <cperciva at freebsd.org> wrote
in <529BEDDB.8010003 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20131202/05143864/attachment.sig>
More information about the freebsd-rc
mailing list