Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Dec 2013 11:22:56 -0800
From:      Colin Percival <cperciva@freebsd.org>
To:        Hiroki Sato <hrs@FreeBSD.org>
Cc:        freebsd-rc@FreeBSD.org
Subject:   Re: RFC: support for re-sourcing /etc/rc.conf
Message-ID:  <529CDE10.9070405@freebsd.org>
In-Reply-To: <20131203.040524.1967340345792909822.hrs@allbsd.org>
References:  <529BEDDB.8010003@freebsd.org>	<20131202.214853.1540734630471865242.hrs@allbsd.org>	<529CD535.5010903@freebsd.org> <20131203.040524.1967340345792909822.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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/<name> happens every time when "load_rc_config <name>" 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



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