From owner-freebsd-current@FreeBSD.ORG Tue Oct 15 21:13:13 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB98ACA9 for ; Tue, 15 Oct 2013 21:13:13 +0000 (UTC) (envelope-from bounces+73574-dfb6-freebsd-current=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 615592922 for ; Tue, 15 Oct 2013 21:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=6r8RknqUuvzGPvYiHZqPTfK8nxg=; b=ExxYqZYQFBtIHw+sjI 9aLaOM0k3+T2Ik1AIax+Sx8spgnZ3jzspfj/2UF8D0D8iezL2eKELvjyoWIz8+8v 1arQGqiHU9cQW/DFGwy0dAHz9MJnSZtN4XDpotABPa5XkoXv7G86pVgBOByBLu3I IkA/zo/3/YLhenv44pXcS96qA= Received: by mf95 with SMTP id mf95.18612.525DAFE8D Tue, 15 Oct 2013 21:13:12 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.13]) by mi19 (SG) with ESMTP id 141bdf72468.19b6.78cfc7 for ; Tue, 15 Oct 2013 21:13:12 +0000 (UTC) Received: (qmail 44063 invoked from network); 15 Oct 2013 21:13:11 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 15 Oct 2013 21:13:11 -0000 Received: (qmail 4982 invoked from network); 15 Oct 2013 21:12:18 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 15 Oct 2013 21:12:18 -0000 Message-ID: <525DAFB2.7090105@freebsd.org> Date: Tue, 15 Oct 2013 14:12:18 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Matthew Fleming Subject: Re: RFC: support for "first boot" rc.d scripts References: <525B258F.3030403@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: XhyBwObMhraAR+zdwMupjQ6BIqbhdEfc+6p+uBxS7S/F6tz08zFvYUkvTz9x4wtiC5aytoRlDlGZt/AIqARa7Z1CZbI1JAGC4I/G9G+C+xj2Ky77ib+wrHy2KQ3wPSLSjWSlLuAYNrbDWISVlG5HurM3Ah1xYSrMdV4Z74Ec4QE= Cc: FreeBSD current , freebsd-rc@freebsd.org 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: Tue, 15 Oct 2013 21:13:13 -0000 On 10/15/13 13:09, Matthew Fleming wrote: > We use something like this at work. However, our version creates a file after > the firstboot scripts have run, and doesn't run if the file exists. > > Is there a reason to prefer one choice over the other? Naively I'd expect it to > be better to run when the file doesn't exist, creating when done; it solves the > problem of making sure the magic file exists before first boot, for the other > polarity. I don't see that making sure that the magic file exists is a problem, since you'd also need to make sure you have knobs turned on in /etc/rc.conf and/or extra rc.d scripts installed. In a very marginal sense, deleting a file is safer than creating one, since if the filesystem is full you can delete but not create. It also seems to me that the sensible polarity is that having something extra lying around makes extra things happen rather than inhibiting them. But probably the best argument has to do with upgrading systems -- if you update a 9.2-RELEASE system to 10.1-RELEASE and there's a "first boot" script in that new release, you don't want to have it accidentally get run simply because you failed to create a /firstboot file during the upgrade process. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid