From owner-freebsd-doc@FreeBSD.ORG Thu Oct 17 19:36:04 2013 Return-Path: Delivered-To: freebsd-doc@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 17156875 for ; Thu, 17 Oct 2013 19:36:04 +0000 (UTC) (envelope-from bounces+73574-42d7-freebsd-doc=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 C51542C79 for ; Thu, 17 Oct 2013 19:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:subject:content-type; s=smtpapi; bh=WjQCzQq7UPp0nA9hYAwxUQPo9Q0=; b=b3TKHEI25bmXCJw85zTxAyQR1zNUx o6RRt/GLWVZArdZCVhr8nKjbTd40spIn+Yec+hSXH1TSWxm3s6AVOtQdv8TEF2an IsRQVV2wUJaBaeSZOU8+ql+B5HUHfLPjFHqmBrXqTaY4ostg9dYH2Cs1E49Ca6Mh AVpFCP23i0Xx7U= Received: by mf11.sendgrid.net with SMTP id mf11.12335.52603C1D2 Thu, 17 Oct 2013 19:35:57 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.15]) by mi21 (SG) with ESMTP id 141c7ead252.6c0f.7ed487 for ; Thu, 17 Oct 2013 19:35:57 +0000 (UTC) Received: (qmail 35512 invoked from network); 17 Oct 2013 19:35:56 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 17 Oct 2013 19:35:56 -0000 Received: (qmail 21746 invoked from network); 17 Oct 2013 19:34:56 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 17 Oct 2013 19:34:56 -0000 Message-ID: <52603BE0.6030708@freebsd.org> Date: Thu, 17 Oct 2013 12:34:56 -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: freebsd-doc@freebsd.org Subject: please review mdoc X-Enigmail-Version: 1.5.2 Content-Type: multipart/mixed; boundary="------------030802010805080105030303" X-SG-EID: 2gBxnW1rbk5uT2ZHwhCdfk069ydCTK+g4Vv3LNJVZEkBT/Ex3Cv/7RHGlq72Q0ptdlWnpGf08wA0/uf++wzx/GzMz4IBgbODR8PVx2RPBKMNNIKG9FbSvBNb0MfPC7y9PrQnC4ks3e57H0TP8AEjwQx0l6om/CcAnqYsKO55t2g= X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 19:36:04 -0000 This is a multi-part message in MIME format. --------------030802010805080105030303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi docs people, It's been a long time since I've edited a man page... can someone check that the attached patch has correct mdoc? This is for new functionality which I hope to commit soon (thread on -rc and -current) and I figured I really ought to document it. ;-) Thanks, -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid --------------030802010805080105030303 Content-Type: text/plain; charset=us-ascii; name="firstboot-man.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="firstboot-man.patch" Index: share/man/man5/rc.conf.5 =================================================================== --- share/man/man5/rc.conf.5 (revision 256432) +++ share/man/man5/rc.conf.5 (working copy) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2013 +.Dd October 17, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -3675,6 +3675,21 @@ is set to .Dq Li YES , this specifies a list of additional iBCS2 loaders to enable. +.It Va firstboot_sentinel +.Pq Vt str +This variable specifies the full path to a +.Dq first boot +sentinel file. +If a file exists with this path, +.Pa rc.d +with the +.Dq firstboot +keyword will be run on startup and the sentinel file will be deleted +after the boot process completes. +Note that this file must be placed on a non-ephemeral read-write +filesystem in order for this to function properly. +The default is +.Pa /firstboot . .It Va linux_enable .Pq Vt bool Set to Index: share/man/man8/rc.8 =================================================================== --- share/man/man8/rc.8 (revision 256432) +++ share/man/man8/rc.8 (working copy) @@ -35,7 +35,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd September 23, 2013 +.Dd October 17, 2013 .Dt RC 8 .Os .Sh NAME @@ -129,6 +129,13 @@ (only allow vnet-enabled jails) to the list of KEYWORDS to skip in .Xr rcorder 8 . .It +If the file +.Va ${firstboot_sentinel} +does not exist, add +.Dq Li firstboot +to the list of KEYWORDS to skip in +.Xr rcorder 8 . +.It Invoke .Xr rcorder 8 to order the files in @@ -156,6 +163,11 @@ .Va $early_late_divider has been run. .It +Check again to see if the file +.Va ${firstboot_sentinel} +exists (in case it is located on a newly mounted filesystem) +and adjust the list of KEYWORDs to skip appropriately. +.It Re-run .Xr rcorder 8 , this time including the scripts in the @@ -164,6 +176,13 @@ Ignore everything up to the .Va $early_late_divider , then start executing the scripts as described above. +.It +If the file +.Va ${firstboot_sentinel} +exists and the file +.Va ${firstboot_sentinel}-reboot +has been created by a script, then reboot. +Delete one or both files. .El .Ss Operation of Nm rc.shutdown .Bl -enum --------------030802010805080105030303--