work work werk
[mikesnafu-overlay.git] / sysvinit-2.86 / man / runlevel.8
blob4837bf144c9fbf1c8de69c18a92b8bebb7c16d9c
1 .TH RUNLEVEL 8 "May 27, 1997" "" "Linux System Administrator's Manual"
2 .SH NAME
3 runlevel -- find the current and previous system runlevel.
4 .SH SYNOPSIS
5 .B runlevel 
6 .RI [ utmp ]
7 .SH DESCRIPTION
8 .B Runlevel
9 reads the system
10 .I utmp
11 file (typically 
12 .IR /var/run/utmp )
13 to locate the runlevel record, and then
14 prints the previous and current system runlevel on its standard output, 
15 separated by a single space. If there is no previous system
16 runlevel, the letter \fBN\fP will be printed instead.
17 .PP
18 If no
19 .I utmp
20 file exists, or if no runlevel record can be found,
21 .B runlevel
22 prints the word \fBunknown\fP and exits with an error.
23 .PP
24 .B Runlevel
25 can be used in \fIrc\fP scripts as a substitute for the System-V
26 \fBwho -r\fP command. 
27 However, in newer versions of \fBinit\fP(8) this information
28 is also available in the environment variables \fBRUNLEVEL\fP and
29 \fBPREVLEVEL\fP.
30 .SH OPTIONS
31 .\"{{{ utmp
32 .IP \fIutmp\fP 
33 The name of the \fIutmp\fP file to read.
34 .\"}}}
35 .SH SEE ALSO
36 .BR init (8),
37 .BR utmp (5)
38 .SH AUTHOR
39 Miquel van Smoorenburg, miquels@cistron.nl