mirror of
https://git.proxmox.com/git/systemd
synced 2025-05-29 11:44:16 +00:00
80 lines
2.3 KiB
Groff
80 lines
2.3 KiB
Groff
'\" t
|
|
.TH "RUNLEVEL" "8" "" "systemd 219" "runlevel"
|
|
.\" -----------------------------------------------------------------
|
|
.\" * Define some portability stuff
|
|
.\" -----------------------------------------------------------------
|
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
.\" http://bugs.debian.org/507673
|
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
.ie \n(.g .ds Aq \(aq
|
|
.el .ds Aq '
|
|
.\" -----------------------------------------------------------------
|
|
.\" * set default formatting
|
|
.\" -----------------------------------------------------------------
|
|
.\" disable hyphenation
|
|
.nh
|
|
.\" disable justification (adjust text to left margin only)
|
|
.ad l
|
|
.\" -----------------------------------------------------------------
|
|
.\" * MAIN CONTENT STARTS HERE *
|
|
.\" -----------------------------------------------------------------
|
|
.SH "NAME"
|
|
runlevel \- Print previous and current SysV runlevel
|
|
.SH "SYNOPSIS"
|
|
.HP \w'\fBrunlevel\ \fR\fB[options...]\fR\ 'u
|
|
\fBrunlevel \fR\fB[options...]\fR
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBrunlevel\fR
|
|
prints the previous and current SysV runlevel if they are known\&.
|
|
.PP
|
|
The two runlevel characters are separated by a single space character\&. If a runlevel cannot be determined, N is printed instead\&. If neither can be determined, the word "unknown" is printed\&.
|
|
.PP
|
|
Unless overridden in the environment, this will check the utmp database for recent runlevel changes\&.
|
|
.SH "OPTIONS"
|
|
.PP
|
|
The following option is understood:
|
|
.PP
|
|
\fB\-\-help\fR
|
|
.RS 4
|
|
Print a short help text and exit\&.
|
|
.RE
|
|
.SH "EXIT STATUS"
|
|
.PP
|
|
If one or both runlevels could be determined, 0 is returned, a non\-zero failure code otherwise\&.
|
|
.SH "ENVIRONMENT"
|
|
.PP
|
|
\fI$RUNLEVEL\fR
|
|
.RS 4
|
|
If
|
|
\fI$RUNLEVEL\fR
|
|
is set,
|
|
\fBrunlevel\fR
|
|
will print this value as current runlevel and ignore utmp\&.
|
|
.RE
|
|
.PP
|
|
\fI$PREVLEVEL\fR
|
|
.RS 4
|
|
If
|
|
\fI$PREVLEVEL\fR
|
|
is set,
|
|
\fBrunlevel\fR
|
|
will print this value as previous runlevel and ignore utmp\&.
|
|
.RE
|
|
.SH "FILES"
|
|
.PP
|
|
/var/run/utmp
|
|
.RS 4
|
|
The utmp database
|
|
\fBrunlevel\fR
|
|
reads the previous and current runlevel from\&.
|
|
.RE
|
|
.SH "NOTES"
|
|
.PP
|
|
This is a legacy command available for compatibility only\&. It should not be used anymore, as the concept of runlevels is obsolete\&.
|
|
.SH "SEE ALSO"
|
|
.PP
|
|
\fBsystemd\fR(1),
|
|
\fBsystemctl\fR(1)
|