File: runlevel.8

package info (click to toggle)
sysvinit 2.86.ds1-38%2Betchnhalf.1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,268 kB
  • ctags: 655
  • sloc: ansic: 7,385; sh: 4,736; makefile: 405; perl: 244
file content (39 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.TH RUNLEVEL 8 "May 27, 1997" "" "Linux System Administrator's Manual"
.SH NAME
runlevel -- find the current and previous system runlevel.
.SH SYNOPSIS
.B runlevel 
.RI [ utmp ]
.SH DESCRIPTION
.B Runlevel
reads the system
.I utmp
file (typically 
.IR /var/run/utmp )
to locate the runlevel record, and then
prints the previous and current system runlevel on its standard output, 
separated by a single space. If there is no previous system
runlevel, the letter \fBN\fP will be printed instead.
.PP
If no
.I utmp
file exists, or if no runlevel record can be found,
.B runlevel
prints the word \fBunknown\fP and exits with an error.
.PP
.B Runlevel
can be used in \fIrc\fP scripts as a substitute for the System-V
\fBwho -r\fP command. 
However, in newer versions of \fBinit\fP(8) this information
is also available in the environment variables \fBRUNLEVEL\fP and
\fBPREVLEVEL\fP.
.SH OPTIONS
.\"{{{ utmp
.IP \fIutmp\fP 
The name of the \fIutmp\fP file to read.
.\"}}}
.SH SEE ALSO
.BR init (8),
.BR utmp (5)
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl