NAME
runlevel - output previous and current runlevel
SYNOPSIS
runlevel [OPTION]... [UTMP]
DESCRIPTION
runlevel
reads the system
utmp
file
(typically /var/run/utmp)
to locate the most recent runlevel record, then outputs the previous and
current runlevel from that record to standard output, separated by a single
space.
If there is no previous runlevel in the record, the letter
N
will be printed instead.
If no
utmp
file exists, or if no runlevel record can be found,
runlevel
prints the word
unknown
and exits with an error.
OPTIONS
R --set =RUNLEVEL
Store a new runlevel record in the
utmp
file.
RUNLEVEL
should be one of 0123456S.
The current runlevel in the output will be
R RUNLEVEL ,
the previous runlevel will be the runlevel from the last record or
N
--reboot
Store a record of the time the system was booted in the
utmp
file, using the current time.
This will not output anything.
EXIT STATUS
runlevel
will exit with status
0
if a
utmp
record was found or written to the file, otherwise it will exit with status
R 1 .
NOTES
This tool is provided for compatibility with the traditional System V
init(8).
Upstart has no notion of runlevels itself, this and the
telinit(8)
tool are provided to emulate their behaviour.
AUTHOR
Written by Scott James Remnant.
REPORTING BUGS
Report bugs at https://launchpad.net/products/upstart/+bugs
COPYRIGHT
Copyright 2006 Canonical Ltd.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO