~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/systemd-inhibit.1

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
'\" t
2
 
.\"     Title: systemd-inhibit
3
 
.\"    Author: Lennart Poettering <lennart@poettering.net>
4
 
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
5
 
.\"      Date: 03/07/2013
6
 
.\"    Manual: systemd-inhibit
7
 
.\"    Source: systemd
8
 
.\"  Language: English
9
 
.\"
10
 
.TH "SYSTEMD\-INHIBIT" "1" "" "systemd" "systemd-inhibit"
11
 
.\" -----------------------------------------------------------------
12
 
.\" * Define some portability stuff
13
 
.\" -----------------------------------------------------------------
14
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
 
.\" http://bugs.debian.org/507673
16
 
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
 
.ie \n(.g .ds Aq \(aq
19
 
.el       .ds Aq '
20
 
.\" -----------------------------------------------------------------
21
 
.\" * set default formatting
22
 
.\" -----------------------------------------------------------------
23
 
.\" disable hyphenation
24
 
.nh
25
 
.\" disable justification (adjust text to left margin only)
26
 
.ad l
27
 
.\" -----------------------------------------------------------------
28
 
.\" * MAIN CONTENT STARTS HERE *
29
 
.\" -----------------------------------------------------------------
30
 
.SH "NAME"
31
 
systemd-inhibit \- Execute a program with an inhibition lock taken
32
 
.SH "SYNOPSIS"
33
 
.HP \w'\fBsystemd\-inhibit\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB[COMMAND]\fR\fB\ \fR\fB[ARGUMENTS...]\fR\ 'u
34
 
\fBsystemd\-inhibit \fR\fB[OPTIONS...]\fR\fB \fR\fB[COMMAND]\fR\fB \fR\fB[ARGUMENTS...]\fR
35
 
.HP \w'\fBsystemd\-inhibit\ \fR\fB[OPTIONS...]\fR\fB\ \-\-list\fR\ 'u
36
 
\fBsystemd\-inhibit \fR\fB[OPTIONS...]\fR\fB \-\-list\fR
37
 
.SH "DESCRIPTION"
38
 
.PP
39
 
\fBsystemd\-inhibit\fR
40
 
may be used to execute a program with a shutdown, sleep or idle inhibitor lock taken\&. The lock will be acquired before the specified command line is executed and released afterwards\&.
41
 
.PP
42
 
Inhibitor locks may be used to block or delay system sleep and shutdown requests from the user, as well as automatic idle handling of the OS\&. This is useful to avoid system suspends while an optical disc is being recorded, or similar operations that should not be interrupted\&.
43
 
.PP
44
 
For more information see the
45
 
\m[blue]\fBInhibitor Lock Developer Documentation\fR\m[]\&\s-2\u[1]\d\s+2\&.
46
 
.SH "OPTIONS"
47
 
.PP
48
 
The following options are understood:
49
 
.PP
50
 
\fB\-h\fR, \fB\-\-help\fR
51
 
.RS 4
52
 
Prints a short help text and exits\&.
53
 
.RE
54
 
.PP
55
 
\fB\-\-version\fR
56
 
.RS 4
57
 
Prints a short version string and exits\&.
58
 
.RE
59
 
.PP
60
 
\fB\-\-what=\fR
61
 
.RS 4
62
 
Takes a colon separated list of one or more operations to inhibit:
63
 
shutdown,
64
 
sleep,
65
 
idle,
66
 
handle\-power\-key,
67
 
handle\-suspend\-key,
68
 
handle\-hibernate\-key,
69
 
handle\-lid\-switch, for inhibiting reboot/power\-off/halt/kexec, suspending/hibernating, the automatic idle detection, or the low\-level handling of the power/sleep key and the lid switch, respectively\&. If omitted, defaults to
70
 
idle:sleep:shutdown\&.
71
 
.RE
72
 
.PP
73
 
\fB\-\-who=\fR
74
 
.RS 4
75
 
Takes a short human readable descriptive string for the program taking the lock\&. If not passed defaults to the command line string\&.
76
 
.RE
77
 
.PP
78
 
\fB\-\-why=\fR
79
 
.RS 4
80
 
Takes a short human readable descriptive string for the reason for taking the lock\&. Defaults to "Unknown reason"\&.
81
 
.RE
82
 
.PP
83
 
\fB\-\-mode=\fR
84
 
.RS 4
85
 
Takes either
86
 
block
87
 
or
88
 
delay
89
 
and describes how the lock is applied\&. If
90
 
block
91
 
is used (the default), the lock prohibits any of the requested operations without time limit, and only privileged users may override it\&. If
92
 
delay
93
 
is used, the lock can only delay the requested operations for a limited time\&. If the time elapses the lock is ignored and the operation executed\&. The time limit may be specified in
94
 
\fBsystemd-logind.conf\fR(5)\&. Note that
95
 
delay
96
 
is only available for
97
 
sleep
98
 
and
99
 
shutdown\&.
100
 
.RE
101
 
.PP
102
 
\fB\-\-list\fR
103
 
.RS 4
104
 
Lists all active inhibition locks instead of acquiring one\&.
105
 
.RE
106
 
.SH "EXIT STATUS"
107
 
.PP
108
 
Returns the exit status of the executed program\&.
109
 
.SH "EXAMPLE"
110
 
.sp
111
 
.if n \{\
112
 
.RS 4
113
 
.\}
114
 
.nf
115
 
# systemd\-inhibit wodim foobar\&.iso
116
 
.fi
117
 
.if n \{\
118
 
.RE
119
 
.\}
120
 
.PP
121
 
This burns the ISO image
122
 
foobar\&.iso
123
 
on a CD using
124
 
\fBwodim\fR(1), and inhibits system sleeping, shutdown and idle while doing so\&.
125
 
.SH "SEE ALSO"
126
 
.PP
127
 
 
128
 
\fBsystemd\fR(1),
129
 
\fBsystemd-logind.conf\fR(5)
130
 
.SH "NOTES"
131
 
.IP " 1." 4
132
 
Inhibitor Lock Developer Documentation
133
 
.RS 4
134
 
\%http://www.freedesktop.org/wiki/Software/systemd/inhibit
135
 
.RE