On 22/09/10 23:57 Ingo Schwarze wrote: > It turned out this one needed a bit more tweaking: > > - a SYNOPSIS entry
OK, but then it needs a link too (patch included), right? > - one place to mention it in the DESCRIPTION > - a brief hint how to create rc.firsttime > (because that's indeed non-obvious) > Regarding FILES, i took oga@'s wording. While nicm@'s bikeshed > is more yellow, it doesn't fit on the line. o...@s wording is the most precise, the run is dependent on file creation, not on system installation or anything else. > OK? Ok for me. tilo Index: Makefile =================================================================== RCS file: /cvs/src/share/man/man8/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- Makefile 5 Jul 2010 22:26:20 -0000 1.73 +++ Makefile 23 Sep 2010 22:03:06 -0000 @@ -11,7 +11,7 @@ MAN= afterboot.8 boot_config.8 compat_ao MLINKS+=boot_config.8 UKC.8 MLINKS+=daily.8 weekly.8 daily.8 monthly.8 -MLINKS+=rc.8 rc.local.8 rc.8 rc.securelevel.8 +MLINKS+=rc.8 rc.firsttime.8 rc.8 rc.local.8 rc.8 rc.securelevel.8 MLINKS+=rc.conf.8 rc.conf.local.8 SUBDIR= man8.alpha man8.amd64 man8.armish man8.aviion man8.hp300 \ Index: rc.8 =================================================================== RCS file: /cvs/src/share/man/man8/rc.8,v retrieving revision 1.25 diff -u -p -r1.25 rc.8 --- rc.8 31 May 2007 19:19:59 -0000 1.25 +++ rc.8 23 Sep 2010 21:48:08 -0000 @@ -37,6 +37,7 @@ .Nd command scripts for system startup .Sh SYNOPSIS .Nm /etc/rc +.Nm /etc/rc.firsttime .Nm /etc/rc.local .Nm /etc/rc.securelevel .Sh DESCRIPTION @@ -51,12 +52,13 @@ is intricately tied to the .Xr netstart 8 script, which runs commands and daemons pertaining to the network. The -.Nm rc.securelevel +.Nm rc.securelevel , +.Nm rc.firsttime and .Nm rc.local scripts hold commands which are pertinent only to a specific site. .Pp -All four of these startup scripts are (or can be) controlled to some +All five of these startup scripts are (or can be) controlled to some extent by variables defined in .Xr rc.conf 8 and @@ -125,6 +127,19 @@ See .Xr securelevel 7 for the effects of setting the security level. .Pp +If +.Nm rc.firsttime +exists, it is executed once and then deleted. +Any output is mailed to root. +When writing to +.Nm rc.firsttime +at system install time using +.Pa siteXX.tgz , +append to it using the +.Pa install.site +script. +Do not replace it, since the installer may write to it, too. +.Pp .Nm rc.local is executed towards the end of .Nm rc @@ -186,21 +201,23 @@ login class as described in .Xr login.conf 5 . .Sh FILES .Bl -tag -width "/etc/rc.securelevelXX" -compact -.It /etc/rc +.It Pa /etc/rc Command scripts for system startup. -.It /etc/rc.local +.It Pa /etc/rc.local Site specific command scripts for system startup. -.It /etc/rc.conf +.It Pa /etc/rc.conf System daemon configuration database. -.It /etc/rc.conf.local +.It Pa /etc/rc.conf.local Site specific daemon configuration database. -.It /etc/rc.securelevel +.It Pa /etc/rc.firsttime +Commands run on the first boot after creation. +.It Pa /etc/rc.securelevel Commands run before the security level changes. -.It /etc/rc.shutdown +.It Pa /etc/rc.shutdown Commands run at system shutdown. -.It /etc/login.conf +.It Pa /etc/login.conf Login class capability database. -.It /etc/netstart +.It Pa /etc/netstart Command script for network startup. .It Pa /fastboot Tells