Colin Percival <[email protected]> wrote in <[email protected]>:
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
pgpgV8MAXZWRU.pgp
Description: PGP signature
