]>
Commit | Line | Data |
---|---|---|
a74aeac6 PR |
1 | '\" -*- coding: UTF-8 -*- |
2 | .\" Copyright (C) 1997 Miquel van Smoorenburg. | |
3 | .\" | |
4 | .\" This program is free software; you can redistribute it and/or modify | |
5 | .\" it under the terms of the GNU General Public License as published by | |
6 | .\" the Free Software Foundation; either version 2 of the License, or | |
7 | .\" (at your option) any later version. | |
8 | .\" | |
9 | .\" This program is distributed in the hope that it will be useful, | |
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | .\" GNU General Public License for more details. | |
13 | .\" | |
14 | .\" You should have received a copy of the GNU General Public License | |
15 | .\" along with this program; if not, write to the Free Software | |
16 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
17 | .\" | |
18 | .TH RUNLEVEL 8 "May 27, 1997" "" "Linux System Administrator's Manual" | |
19 | .SH NAME | |
20 | runlevel -- find the previous and current system runlevel. | |
21 | .SH SYNOPSIS | |
22 | .B runlevel | |
23 | .RI [ utmp ] | |
24 | .SH DESCRIPTION | |
25 | .B Runlevel | |
26 | reads the system | |
27 | .I utmp | |
28 | file (typically | |
29 | .IR /var/run/utmp ) | |
30 | to locate the runlevel record, and then | |
31 | prints the previous and current system runlevel on its standard output, | |
32 | separated by a single space. If there is no previous system | |
33 | runlevel, the letter \fBN\fP will be printed instead. | |
34 | .PP | |
35 | If no | |
36 | .I utmp | |
37 | file exists, or if no runlevel record can be found, | |
38 | .B runlevel | |
39 | prints the word \fBunknown\fP and exits with an error. | |
40 | .PP | |
41 | .B Runlevel | |
42 | can be used in \fIrc\fP scripts as a substitute for the System-V | |
43 | \fBwho -r\fP command. | |
44 | However, in newer versions of \fBinit\fP(8) this information | |
45 | is also available in the environment variables \fBRUNLEVEL\fP and | |
46 | \fBPREVLEVEL\fP. | |
47 | .SH OPTIONS | |
48 | .\"{{{ utmp | |
49 | .IP \fIutmp\fP | |
50 | The name of the \fIutmp\fP file to read. | |
51 | .\"}}} | |
52 | .SH SEE ALSO | |
53 | .BR init (8), | |
54 | .BR utmp (5) | |
55 | .SH AUTHOR | |
56 | Miquel van Smoorenburg, miquels@cistron.nl |