xref: /freebsd/sbin/init/init.8 (revision c4d9468ea0e627c69802bd0689c93527dc2e2a85)
18fae3551SRodney W. Grimes.\" Copyright (c) 1980, 1991, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by
58fae3551SRodney W. Grimes.\" Donn Seeley at Berkeley Software Design, Inc.
68fae3551SRodney W. Grimes.\"
78fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
88fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
98fae3551SRodney W. Grimes.\" are met:
108fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
118fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
128fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
138fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
148fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
158fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
168fae3551SRodney W. Grimes.\"    must display the following acknowledgement:
178fae3551SRodney W. Grimes.\"	This product includes software developed by the University of
188fae3551SRodney W. Grimes.\"	California, Berkeley and its contributors.
198fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
208fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
218fae3551SRodney W. Grimes.\"    without specific prior written permission.
228fae3551SRodney W. Grimes.\"
238fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
248fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
258fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
268fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
278fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
288fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
298fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
308fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
318fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
328fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
338fae3551SRodney W. Grimes.\" SUCH DAMAGE.
348fae3551SRodney W. Grimes.\"
358fae3551SRodney W. Grimes.\"     @(#)init.8	8.3 (Berkeley) 4/18/94
367f3dea24SPeter Wemm.\" $FreeBSD$
378fae3551SRodney W. Grimes.\"
388fae3551SRodney W. Grimes.Dd April 18, 1994
398fae3551SRodney W. Grimes.Dt INIT 8
409fe48c6eSRuslan Ermilov.Os
418fae3551SRodney W. Grimes.Sh NAME
428fae3551SRodney W. Grimes.Nm init
438fae3551SRodney W. Grimes.Nd process control initialization
448fae3551SRodney W. Grimes.Sh SYNOPSIS
457c7fb079SRuslan Ermilov.Nm
467c7fb079SRuslan Ermilov.Nm
471681d659SRuslan Ermilov.Oo
481681d659SRuslan Ermilov.Cm 0 | 1 | 6 |
491681d659SRuslan Ermilov.Cm c | q
501681d659SRuslan Ermilov.Oc
518fae3551SRodney W. Grimes.Sh DESCRIPTION
528fae3551SRodney W. GrimesThe
535df42cf4SPhilippe Charnier.Nm
548fae3551SRodney W. Grimesprogram
558fae3551SRodney W. Grimesis the last stage of the boot process.
568fae3551SRodney W. GrimesIt normally runs the automatic reboot sequence as described in
571681d659SRuslan Ermilov.Xr rc 8 ,
588fae3551SRodney W. Grimesand if this succeeds, begins multi-user operation.
598fae3551SRodney W. GrimesIf the reboot scripts fail,
605df42cf4SPhilippe Charnier.Nm
611681d659SRuslan Ermilovcommences single-user operation by giving
628fae3551SRodney W. Grimesthe super-user a shell on the console.
638fae3551SRodney W. GrimesThe
645df42cf4SPhilippe Charnier.Nm
658fae3551SRodney W. Grimesprogram may be passed parameters
668fae3551SRodney W. Grimesfrom the boot program to
678fae3551SRodney W. Grimesprevent the system from going multi-user and to instead execute
681681d659SRuslan Ermilova single-user shell without starting the normal daemons.
698fae3551SRodney W. GrimesThe system is then quiescent for maintenance work and may
708fae3551SRodney W. Grimeslater be made to go to multi-user by exiting the
718fae3551SRodney W. Grimessingle-user shell (with ^D).
728fae3551SRodney W. GrimesThis
738fae3551SRodney W. Grimescauses
745df42cf4SPhilippe Charnier.Nm
758fae3551SRodney W. Grimesto run the
768fae3551SRodney W. Grimes.Pa /etc/rc
778fae3551SRodney W. Grimesstart up command file in fastboot mode (skipping disk checks).
788fae3551SRodney W. Grimes.Pp
798fae3551SRodney W. GrimesIf the
805df42cf4SPhilippe Charnier.Em console
818fae3551SRodney W. Grimesentry in the
828fae3551SRodney W. Grimes.Xr ttys 5
831681d659SRuslan Ermilovfile is marked
841681d659SRuslan Ermilov.Dq insecure ,
858fae3551SRodney W. Grimesthen
865df42cf4SPhilippe Charnier.Nm
871681d659SRuslan Ermilovwill require that the super-user password be
888fae3551SRodney W. Grimesentered before the system will start a single-user shell.
898fae3551SRodney W. GrimesThe password check is skipped if the
905df42cf4SPhilippe Charnier.Em console
911681d659SRuslan Ermilovis marked as
921681d659SRuslan Ermilov.Dq secure .
938fae3551SRodney W. Grimes.Pp
948fae3551SRodney W. GrimesThe kernel runs with four different levels of security.
95a4edcf89SKATO TakenoriAny super-user process can raise the security level, but no process
968fae3551SRodney W. Grimescan lower it.
9738058917SBruce EvansThe security levels are:
988fae3551SRodney W. Grimes.Bl -tag -width flag
998fae3551SRodney W. Grimes.It Ic -1
10038058917SBruce EvansPermanently insecure mode \- always run the system in level 0 mode.
1016ebaa024SJoseph KoshyThis is the default initial value.
1028fae3551SRodney W. Grimes.It Ic 0
1038fae3551SRodney W. GrimesInsecure mode \- immutable and append-only flags may be turned off.
1048fae3551SRodney W. GrimesAll devices may be read or written subject to their permissions.
1058fae3551SRodney W. Grimes.It Ic 1
10679665533SMike PritchardSecure mode \- the system immutable and system append-only flags may not
10779665533SMike Pritchardbe turned off;
1088fae3551SRodney W. Grimesdisks for mounted filesystems,
1098fae3551SRodney W. Grimes.Pa /dev/mem ,
1108fae3551SRodney W. Grimesand
1118fae3551SRodney W. Grimes.Pa /dev/kmem
1128afbbd41SBen Smithurstmay not be opened for writing;
1138afbbd41SBen Smithurstkernel modules (see
1148afbbd41SBen Smithurst.Xr kld 4 )
1158afbbd41SBen Smithurstmay not be loaded or unloaded.
1168fae3551SRodney W. Grimes.It Ic 2
11738058917SBruce EvansHighly secure mode \- same as secure mode, plus disks may not be
11838058917SBruce Evansopened for writing (except by
11938058917SBruce Evans.Xr mount 2 )
12038058917SBruce Evanswhether mounted or not.
1218fae3551SRodney W. GrimesThis level precludes tampering with filesystems by unmounting them,
1228fae3551SRodney W. Grimesbut also inhibits running
1238fae3551SRodney W. Grimes.Xr newfs 8
1248fae3551SRodney W. Grimeswhile the system is multi-user.
125ae110038SNik Clayton.Pp
126ae110038SNik ClaytonIn addition, kernel time changes are restricted to less than or equal to one
127ae110038SNik Claytonsecond.  Attempts to change the time by more than this will log the message
128ae110038SNik Clayton.Dq Time adjustment clamped to +1 second .
12904b2ac6eSGuy Helmer.It Ic 3
13004b2ac6eSGuy HelmerNetwork secure mode \- same as highly secure mode, plus
13104b2ac6eSGuy HelmerIP packet filter rules (see
13204b2ac6eSGuy Helmer.Xr ipfw 8
13304b2ac6eSGuy Helmerand
13404b2ac6eSGuy Helmer.Xr ipfirewall 4 )
1351681d659SRuslan Ermilovcannot be changed and
1361681d659SRuslan Ermilov.Xr dummynet 4
1371681d659SRuslan Ermilovconfiguration cannot be adjusted.
1388fae3551SRodney W. Grimes.El
1398fae3551SRodney W. Grimes.Pp
14067b661fdSSheldon HearnIf the security level is initially nonzero, then
1415df42cf4SPhilippe Charnier.Nm
14238058917SBruce Evansleaves it unchanged.
14338058917SBruce EvansOtherwise,
1445df42cf4SPhilippe Charnier.Nm
14567b661fdSSheldon Hearnraises the level to 1 before going multi-user for the first time.
14601de0116SSheldon HearnSince the level can not be reduced, it will be at least 1 for
14701de0116SSheldon Hearnsubsequent operation, even on return to single-user.
14867b661fdSSheldon HearnIf a level higher than 1 is desired while running multi-user,
14967b661fdSSheldon Hearnit can be set before going multi-user, e.g., by the startup script
15067b661fdSSheldon Hearn.Xr rc 8 ,
1518fae3551SRodney W. Grimesusing
1526ebaa024SJoseph Koshy.Xr sysctl 8
1536ebaa024SJoseph Koshyto set the
1546ebaa024SJoseph Koshy.Dq kern.securelevel
1556ebaa024SJoseph Koshyvariable to the required security level.
1568fae3551SRodney W. Grimes.Pp
1578fae3551SRodney W. GrimesIn multi-user operation,
1585df42cf4SPhilippe Charnier.Nm
1598fae3551SRodney W. Grimesmaintains
1608fae3551SRodney W. Grimesprocesses for the terminal ports found in the file
1618fae3551SRodney W. Grimes.Xr ttys 5 .
1628fae3551SRodney W. Grimes.Nm Init
163f0f4f756SSheldon Hearnreads this file and executes the command found in the second field,
164f0f4f756SSheldon Hearnunless the first field refers to a device in
165f0f4f756SSheldon Hearn.Pa /dev
166f0f4f756SSheldon Hearnwhich is not configured.
167f0f4f756SSheldon HearnThe first field is supplied as the final argument to the command.
1688fae3551SRodney W. GrimesThis command is usually
1698fae3551SRodney W. Grimes.Xr getty 8 ;
170edf0e5b3SMike Pritchard.Nm getty
1718fae3551SRodney W. Grimesopens and initializes the tty line
1728fae3551SRodney W. Grimesand
1738fae3551SRodney W. Grimesexecutes the
174edf0e5b3SMike Pritchard.Xr login 1
1758fae3551SRodney W. Grimesprogram.
1768fae3551SRodney W. GrimesThe
177edf0e5b3SMike Pritchard.Nm login
1788fae3551SRodney W. Grimesprogram, when a valid user logs in,
1798fae3551SRodney W. Grimesexecutes a shell for that user.  When this shell
1808fae3551SRodney W. Grimesdies, either because the user logged out
1818fae3551SRodney W. Grimesor an abnormal termination occurred (a signal),
1828fae3551SRodney W. Grimesthe
1835df42cf4SPhilippe Charnier.Nm
1848fae3551SRodney W. Grimesprogram wakes up, deletes the user
1858fae3551SRodney W. Grimesfrom the
1868fae3551SRodney W. Grimes.Xr utmp 5
1878fae3551SRodney W. Grimesfile of current users and records the logout in the
188edf0e5b3SMike Pritchard.Xr wtmp 5
1898fae3551SRodney W. Grimesfile.
1908fae3551SRodney W. GrimesThe cycle is
1918fae3551SRodney W. Grimesthen restarted by
1925df42cf4SPhilippe Charnier.Nm
1938fae3551SRodney W. Grimesexecuting a new
194edf0e5b3SMike Pritchard.Nm getty
1958fae3551SRodney W. Grimesfor the line.
1968fae3551SRodney W. Grimes.Pp
197f0f4f756SSheldon Hearn.Nm Init
198f0f4f756SSheldon Hearncan also be used to keep arbitrary daemons running,
199f0f4f756SSheldon Hearnautomatically restarting them if they die.
200f0f4f756SSheldon HearnIn this case, the first field in the
201f0f4f756SSheldon Hearn.Xr ttys 5
202f0f4f756SSheldon Hearnfile must not reference the path to a configured device node
203f0f4f756SSheldon Hearnand will be passed to the daemon
204f0f4f756SSheldon Hearnas the final argument on its command line.
205f0f4f756SSheldon HearnThis is similar to the facility offered in the
206f0f4f756SSheldon Hearn.At V
207f0f4f756SSheldon Hearn.Pa /etc/inittab .
208f0f4f756SSheldon Hearn.Pp
2098fae3551SRodney W. GrimesLine status (on, off, secure, getty, or window information)
2108fae3551SRodney W. Grimesmay be changed in the
211edf0e5b3SMike Pritchard.Xr ttys 5
2128fae3551SRodney W. Grimesfile without a reboot by sending the signal
2138fae3551SRodney W. Grimes.Dv SIGHUP
2148fae3551SRodney W. Grimesto
2155df42cf4SPhilippe Charnier.Nm
2168fae3551SRodney W. Grimeswith the command
2178fae3551SRodney W. Grimes.Dq Li "kill -HUP 1" .
2188fae3551SRodney W. GrimesOn receipt of this signal,
2195df42cf4SPhilippe Charnier.Nm
2208fae3551SRodney W. Grimesre-reads the
221edf0e5b3SMike Pritchard.Xr ttys 5
2228fae3551SRodney W. Grimesfile.
2238fae3551SRodney W. GrimesWhen a line is turned off in
224edf0e5b3SMike Pritchard.Xr ttys 5 ,
2255df42cf4SPhilippe Charnier.Nm
2268fae3551SRodney W. Grimeswill send a SIGHUP signal to the controlling process
2278fae3551SRodney W. Grimesfor the session associated with the line.
2288fae3551SRodney W. GrimesFor any lines that were previously turned off in the
229edf0e5b3SMike Pritchard.Xr ttys 5
2308fae3551SRodney W. Grimesfile and are now on,
2315df42cf4SPhilippe Charnier.Nm
232f0f4f756SSheldon Hearnexecutes the command specified in the second field.
233f0f4f756SSheldon HearnIf the command or window field for a line is changed,
2348fae3551SRodney W. Grimesthe change takes effect at the end of the current
2358fae3551SRodney W. Grimeslogin session (e.g., the next time
2365df42cf4SPhilippe Charnier.Nm
2378fae3551SRodney W. Grimesstarts a process on the line).
2388fae3551SRodney W. GrimesIf a line is commented out or deleted from
239edf0e5b3SMike Pritchard.Xr ttys 5 ,
2405df42cf4SPhilippe Charnier.Nm
2418fae3551SRodney W. Grimeswill not do anything at all to that line.
2428fae3551SRodney W. GrimesHowever, it will complain that the relationship between lines
2438fae3551SRodney W. Grimesin the
244edf0e5b3SMike Pritchard.Xr ttys 5
2458fae3551SRodney W. Grimesfile and records in the
246edf0e5b3SMike Pritchard.Xr utmp 5
2478fae3551SRodney W. Grimesfile is out of sync,
2488fae3551SRodney W. Grimesso this practice is not recommended.
2498fae3551SRodney W. Grimes.Pp
2508fae3551SRodney W. Grimes.Nm Init
2518fae3551SRodney W. Grimeswill terminate multi-user operations and resume single-user mode
2528fae3551SRodney W. Grimesif sent a terminate
2538fae3551SRodney W. Grimes.Pq Dv TERM
2548fae3551SRodney W. Grimessignal, for example,
2558fae3551SRodney W. Grimes.Dq Li "kill \-TERM 1" .
2568fae3551SRodney W. GrimesIf there are processes outstanding that are deadlocked (because of
2578fae3551SRodney W. Grimeshardware or software failure),
2585df42cf4SPhilippe Charnier.Nm
2598fae3551SRodney W. Grimeswill not wait for them all to die (which might take forever), but
2608fae3551SRodney W. Grimeswill time out after 30 seconds and print a warning message.
2618fae3551SRodney W. Grimes.Pp
2628fae3551SRodney W. Grimes.Nm Init
263f0f4f756SSheldon Hearnwill cease creating new processes
2648fae3551SRodney W. Grimesand allow the system to slowly die away, if it is sent a terminal stop
2658fae3551SRodney W. Grimes.Pq Dv TSTP
2668fae3551SRodney W. Grimessignal, i.e.
2678fae3551SRodney W. Grimes.Dq Li "kill \-TSTP 1" .
2688fae3551SRodney W. GrimesA later hangup will resume full
2691681d659SRuslan Ermilovmulti-user operations, or a terminate will start a single-user shell.
2708fae3551SRodney W. GrimesThis hook is used by
2718fae3551SRodney W. Grimes.Xr reboot 8
2728fae3551SRodney W. Grimesand
2738fae3551SRodney W. Grimes.Xr halt 8 .
2748fae3551SRodney W. Grimes.Pp
275e460cfd3SNate Williams.Nm Init
276e460cfd3SNate Williamswill terminate all possible processes (again, it will not wait
277e460cfd3SNate Williamsfor deadlocked processes) and reboot the machine if sent the interrupt
278e460cfd3SNate Williams.Pq Dv INT
279e460cfd3SNate Williamssignal, i.e.
280e460cfd3SNate Williams.Dq Li "kill \-INT 1".
281e460cfd3SNate WilliamsThis is useful for shutting the machine down cleanly from inside the kernel
2824f3cac8fSAdam Davidor from X when the machine appears to be hung.
283e460cfd3SNate Williams.Pp
284a0a549c7SRuslan Ermilov.Nm Init
2851681d659SRuslan Ermilovwill do the same, except it will halt the machine if sent
286a0a549c7SRuslan Ermilovthe user defined signal 1
287a0a549c7SRuslan Ermilov.Pq Dv USR1 ,
2881681d659SRuslan Ermilovor will halt and turn the power off (if hardware permits) if sent
289a0a549c7SRuslan Ermilovthe user defined signal 2
290a0a549c7SRuslan Ermilov.Pq Dv USR2 .
291a0a549c7SRuslan Ermilov.Pp
2926ebaa024SJoseph KoshyWhen shutting down the machine,
2935df42cf4SPhilippe Charnier.Nm
2948889c700SDavid Nugentwill try to run the
2958889c700SDavid Nugent.Pa /etc/rc.shutdown
296ef8f7ac9SSheldon Hearnscript.
297ef8f7ac9SSheldon HearnThis script can be used to cleanly terminate specific programs such
2988889c700SDavid Nugentas
2998889c700SDavid Nugent.Nm innd
3008889c700SDavid Nugent(the InterNetNews server).
3018889c700SDavid Nugent.Pp
3028fae3551SRodney W. GrimesThe role of
3035df42cf4SPhilippe Charnier.Nm
3048fae3551SRodney W. Grimesis so critical that if it dies, the system will reboot itself
3058fae3551SRodney W. Grimesautomatically.
3068fae3551SRodney W. GrimesIf, at bootstrap time, the
3075df42cf4SPhilippe Charnier.Nm
3088fae3551SRodney W. Grimesprocess cannot be located, the system will panic with the message
3091681d659SRuslan Ermilov.Dq "panic: init died (signal %d, exit %d)" .
3101681d659SRuslan Ermilov.Pp
3115d94d8b6SRuslan ErmilovIf run as a user process as shown in the second synopsis line,
3121681d659SRuslan Ermilov.Nm
3131681d659SRuslan Ermilovwill emulate
3141681d659SRuslan Ermilov.At V
3151681d659SRuslan Ermilovbehavior, i.e. super-user can specify the desired
3161681d659SRuslan Ermilov.Em run-level
3171681d659SRuslan Ermilovon a command line, and
3181681d659SRuslan Ermilov.Nm
3191681d659SRuslan Ermilovwill signal the original
320c4d9468eSRuslan Ermilov(PID 1)
3211681d659SRuslan Ermilov.Nm
3221681d659SRuslan Ermilovas follows:
3231681d659SRuslan Ermilov.Bl -column Run-level SIGTERM
324d8aa002eSRuslan Ermilov.It Sy "Run-level	Signal	Action
3251681d659SRuslan Ermilov.It Cm 0 Ta Dv SIGUSR2 Ta "Halt and turn the power off"
3261681d659SRuslan Ermilov.It Cm 1 Ta Dv SIGTERM Ta "Go to single-user mode"
3271681d659SRuslan Ermilov.It Cm 6 Ta Dv SIGINT Ta "Reboot the machine"
3281681d659SRuslan Ermilov.It Cm c Ta Dv SIGTSTP Ta "Block further logins"
3291681d659SRuslan Ermilov.It Cm q Ta Dv SIGHUP Ta Rescan the
3301681d659SRuslan Ermilov.Xr ttys 5
3311681d659SRuslan Ermilovfile
3321681d659SRuslan Ermilov.El
3338fae3551SRodney W. Grimes.Sh DIAGNOSTICS
3342306a12fSDima Dorfman.Bl -diag
3352306a12fSDima Dorfman.It "getty repeating too quickly on port %s, sleeping."
3368fae3551SRodney W. GrimesA process being started to service a line is exiting quickly
3378fae3551SRodney W. Grimeseach time it is started.
3388fae3551SRodney W. GrimesThis is often caused by a ringing or noisy terminal line.
3391681d659SRuslan Ermilov.Em "Init will sleep for 30 seconds" ,
3408fae3551SRodney W. Grimes.Em "then continue trying to start the process" .
3412306a12fSDima Dorfman.It "some processes would not die; ps axl advised."
3428fae3551SRodney W. GrimesA process
3438fae3551SRodney W. Grimesis hung and could not be killed when the system was shutting down.
3448fae3551SRodney W. GrimesThis condition is usually caused by a process
3458fae3551SRodney W. Grimesthat is stuck in a device driver because of
3468fae3551SRodney W. Grimesa persistent device error condition.
3478fae3551SRodney W. Grimes.El
3488fae3551SRodney W. Grimes.Sh FILES
349a0a549c7SRuslan Ermilov.Bl -tag -width /etc/rc.shutdown -compact
3508fae3551SRodney W. Grimes.It Pa /dev/console
3515df42cf4SPhilippe Charniersystem console device
3528fae3551SRodney W. Grimes.It Pa /dev/tty*
3535df42cf4SPhilippe Charnierterminal ports found in
3545df42cf4SPhilippe Charnier.Xr ttys 5
3558fae3551SRodney W. Grimes.It Pa /var/run/utmp
3565df42cf4SPhilippe Charnierrecord of current users on the system
3578fae3551SRodney W. Grimes.It Pa /var/log/wtmp
3585df42cf4SPhilippe Charnierrecord of all logins and logouts
3598fae3551SRodney W. Grimes.It Pa /etc/ttys
3605df42cf4SPhilippe Charnierthe terminal initialization information file
3618fae3551SRodney W. Grimes.It Pa /etc/rc
3625df42cf4SPhilippe Charniersystem startup commands
3638889c700SDavid Nugent.It Pa /etc/rc.shutdown
3645df42cf4SPhilippe Charniersystem shutdown commands
3658fae3551SRodney W. Grimes.El
3668fae3551SRodney W. Grimes.Sh SEE ALSO
3678fae3551SRodney W. Grimes.Xr kill 1 ,
368af202156SWolfram Schneider.Xr login 1 ,
3698fae3551SRodney W. Grimes.Xr sh 1 ,
3701681d659SRuslan Ermilov.Xr dummynet 4 ,
37104b2ac6eSGuy Helmer.Xr ipfirewall 4 ,
3728afbbd41SBen Smithurst.Xr kld 4 ,
3738fae3551SRodney W. Grimes.Xr ttys 5 ,
3748fae3551SRodney W. Grimes.Xr crash 8 ,
3758fae3551SRodney W. Grimes.Xr getty 8 ,
376af202156SWolfram Schneider.Xr halt 8 ,
37704b2ac6eSGuy Helmer.Xr ipfw 8 ,
3788fae3551SRodney W. Grimes.Xr rc 8 ,
3798fae3551SRodney W. Grimes.Xr reboot 8 ,
3806ebaa024SJoseph Koshy.Xr shutdown 8 ,
3816ebaa024SJoseph Koshy.Xr sysctl 8
3828fae3551SRodney W. Grimes.Sh HISTORY
383a0a549c7SRuslan ErmilovAn
3848fae3551SRodney W. Grimes.Nm
3858fae3551SRodney W. Grimescommand appeared in
3868fae3551SRodney W. Grimes.At v6 .
3876ebaa024SJoseph Koshy.Sh CAVEATS
3888fae3551SRodney W. GrimesSystems without
3898fae3551SRodney W. Grimes.Xr sysctl
3908fae3551SRodney W. Grimesbehave as though they have security level \-1.
3916ebaa024SJoseph Koshy.Pp
39204b2ac6eSGuy HelmerSetting the security level above 1 too early in the boot sequence can
3936ebaa024SJoseph Koshyprevent
3946ebaa024SJoseph Koshy.Xr fsck 8
3956ebaa024SJoseph Koshyfrom repairing inconsistent filesystems.  The
3966ebaa024SJoseph Koshypreferred location to set the security level is at the end of
3976ebaa024SJoseph Koshy.Pa /etc/rc
3986ebaa024SJoseph Koshyafter all multi-user startup actions are complete.
399