From owner-freebsd-current@FreeBSD.ORG Sun Oct 13 23:32:08 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 134A8875 for ; Sun, 13 Oct 2013 23:32:08 +0000 (UTC) (envelope-from freebsd@allanjude.com) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id E13662D43 for ; Sun, 13 Oct 2013 23:32:07 +0000 (UTC) Received: from [192.168.1.105] (S01060015e9b562c7.hm.shawcable.net [50.70.17.171]) (Authenticated sender: roleaccount@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 5C4E037980 for ; Sun, 13 Oct 2013 23:32:06 +0000 (UTC) Message-ID: <525B2D75.7080803@allanjude.com> Date: Sun, 13 Oct 2013 19:32:05 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: RFC: support for "first boot" rc.d scripts References: <525B258F.3030403@freebsd.org> In-Reply-To: <525B258F.3030403@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 23:32:08 -0000 On 2013-10-13 18:58, Colin Percival wrote: > Hi all, > > I've attached a very simple patch which makes /etc/rc: > > 1. Skip any rc.d scripts with the "firstboot" keyword if /var/db/firstboot > does not exist, > > 2. If /var/db/firstboot and /var/db/firstboot-reboot exist after running rc.d > scripts, reboot. > > 3. Delete /var/db/firstboot (and firstboot-reboot) after the first boot. > > The purpose of this is to support "run on first boot" rc.d scripts. These can > be useful for both virtual machines and embedded systems; unlike conventional > desktops and servers, these may have a lengthy gap between "installing" and > "turning on" the system. > > As examples of what such scripts could do: > > * In Amazon EC2, I use a "first boot" script to download an SSH public key > from EC2 so that users can log in to newly provisioned EC2 instances. > > * Now that (starting from 10.0-BETA1) it is possible to use FreeBSD Update > to update everything on EC2 instances, I'm planning on writing a script which > runs 'freebsd-update fetch install' when the system first boots, and then > reboots if there were updates installed. (I imagine this would be useful > to other embedded / VM providers too.) > > * Once packages are provided (properly) for 10.0 I'd like to allow people to > specify a list of packages they want installed onto an EC2 instance and have > them downloaded and installed when the EC2 instance launches. > > I'd like to get this into HEAD in the near future in the hope that I can > convince re@ that this is a simple enough (and safe enough) change to merge > before 10.0-RELEASE. > > Comments? > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" This looks extremely useful. Thank you.