chiark / gitweb /
catalog: update pt_BR translation
[elogind.git] / man / runlevel.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="runlevel"
25           xmlns:xi="http://www.w3.org/2001/XInclude"
26           conditional="HAVE_UTMP">
27
28         <refentryinfo>
29                 <title>runlevel</title>
30                 <productname>systemd</productname>
31
32                 <authorgroup>
33                         <author>
34                                 <contrib>Developer</contrib>
35                                 <firstname>Lennart</firstname>
36                                 <surname>Poettering</surname>
37                                 <email>lennart@poettering.net</email>
38                         </author>
39                 </authorgroup>
40         </refentryinfo>
41
42         <refmeta>
43                 <refentrytitle>runlevel</refentrytitle>
44                 <manvolnum>8</manvolnum>
45         </refmeta>
46
47         <refnamediv>
48                 <refname>runlevel</refname>
49                 <refpurpose>Print previous and current SysV runlevel</refpurpose>
50         </refnamediv>
51
52         <refsynopsisdiv>
53                 <cmdsynopsis>
54                         <command>runlevel <arg choice="opt" rep="repeat">options</arg></command>
55                 </cmdsynopsis>
56         </refsynopsisdiv>
57
58         <refsect1>
59                 <title>Description</title>
60
61                 <para><command>runlevel</command> prints the previous
62                 and current SysV runlevel if they are known.</para>
63
64                 <para>The two runlevel characters are separated by a
65                 single space character. If a runlevel cannot be
66                 determined, N is printed instead. If neither can be
67                 determined, the word "unknown" is printed.</para>
68
69                 <para>Unless overridden in the environment, this will
70                 check the utmp database for recent runlevel
71                 changes.</para>
72         </refsect1>
73
74         <refsect1>
75                 <title>Options</title>
76
77                 <para>The following option is understood:</para>
78
79                 <variablelist>
80                         <varlistentry>
81                                 <term><option>--help</option></term>
82
83                                 <xi:include href="standard-options.xml" xpointer="help-text" />
84                         </varlistentry>
85                 </variablelist>
86
87         </refsect1>
88
89         <refsect1>
90                 <title>Exit status</title>
91
92                 <para>If one or both runlevels could be determined, 0
93                 is returned, a non-zero failure code otherwise.</para>
94
95         </refsect1>
96
97         <refsect1>
98                 <title>Environment</title>
99
100                 <variablelist class='environment-variables'>
101                         <varlistentry>
102                                 <term><varname>$RUNLEVEL</varname></term>
103
104                                 <listitem><para>If
105                                 <varname>$RUNLEVEL</varname> is set,
106                                 <command>runlevel</command> will print
107                                 this value as current runlevel and
108                                 ignore utmp.</para></listitem>
109                         </varlistentry>
110
111                         <varlistentry>
112                                 <term><varname>$PREVLEVEL</varname></term>
113
114                                 <listitem><para>If
115                                 <varname>$PREVLEVEL</varname> is set,
116                                 <command>runlevel</command> will print
117                                 this value as previous runlevel and
118                                 ignore utmp.</para></listitem>
119                         </varlistentry>
120                 </variablelist>
121         </refsect1>
122
123         <refsect1>
124                 <title>Files</title>
125
126                 <variablelist>
127                         <varlistentry>
128                                 <term><filename>/var/run/utmp</filename></term>
129
130                                 <listitem><para>The utmp database
131                                 <command>runlevel</command> reads the
132                                 previous and current runlevel
133                                 from.</para></listitem>
134
135                         </varlistentry>
136                 </variablelist>
137         </refsect1>
138
139         <refsect1>
140                 <title>Notes</title>
141
142                 <para>This is a legacy command available for compatibility
143                 only. It should not be used anymore, as the concept of
144                 runlevels is obsolete.</para>
145         </refsect1>
146
147         <refsect1>
148                 <title>See Also</title>
149                 <para>
150                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
151                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
152                 </para>
153         </refsect1>
154
155 </refentry>