File: systemd.target.5

package info (click to toggle)
manpages-de 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 71,404 kB
  • sloc: sh: 1,059; makefile: 71; python: 64; perl: 37; sed: 11
file content (145 lines) | stat: -rw-r--r-- 4,583 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
'\" t
.TH "SYSTEMD\&.TARGET" "5" "" "systemd 241" "systemd.target"
.\" -----------------------------------------------------------------
.\" * 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"
systemd.target \- Target unit configuration
.SH "SYNOPSIS"
.PP
\fItarget\fR\&.target
.SH "DESCRIPTION"
.PP
A unit configuration file whose name ends in
"\&.target"
encodes information about a target unit of systemd, which is used for grouping units and as well\-known synchronization points during start\-up\&.
.PP
This unit type has no specific options\&. See
\fBsystemd.unit\fR(5)
for the common options of all unit configuration files\&. The common configuration items are configured in the generic [Unit] and [Install] sections\&. A separate [Target] section does not exist, since no target\-specific options may be configured\&.
.PP
Target units do not offer any additional functionality on top of the generic functionality provided by units\&. They exist merely to group units via dependencies (useful as boot targets), and to establish standardized names for synchronization points used in dependencies between units\&. Among other things, target units are a more flexible replacement for SysV runlevels in the classic SysV init system\&. (And for compatibility reasons special target units such as
runlevel3\&.target
exist which are used by the SysV runlevel compatibility code in systemd\&. See
\fBsystemd.special\fR(7)
for details)\&.
.SH "AUTOMATIC DEPENDENCIES"
.SS "Implicit Dependencies"
.PP
There are no implicit dependencies for target units\&.
.SS "Default Dependencies"
.PP
The following dependencies are added unless
\fIDefaultDependencies=no\fR
is set:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Target units will automatically complement all configured dependencies of type
\fIWants=\fR
or
\fIRequires=\fR
with dependencies of type
\fIAfter=\fR
unless
\fIDefaultDependencies=no\fR
is set in the specified units\&. Note that
\fIWants=\fR
or
\fIRequires=\fR
must be defined in the target unit itself \(em if you for example define
\fIWants=\fRsome\&.target in some\&.service, the automatic ordering will not be added\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Target units automatically gain
\fIConflicts=\fR
and
\fIBefore=\fR
dependencies against
shutdown\&.target\&.
.RE
.SH "EXAMPLE"
.PP
\fBExample\ \&1.\ \&Simple standalone target\fR
.sp
.if n \{\
.RS 4
.\}
.nf
# emergency\-net\&.target

[Unit]
Description=Emergency Mode with Networking
Requires=emergency\&.target systemd\-networkd\&.service
After=emergency\&.target systemd\-networkd\&.service
AllowIsolate=yes
.fi
.if n \{\
.RE
.\}
.PP
When adding dependencies to other units, it\*(Aqs important to check if they set
\fIDefaultDependencies=\fR\&. Service units, unless they set
\fIDefaultDependencies=no\fR, automatically get a dependency on
sysinit\&.target\&. In this case, both
emergency\&.target
and
systemd\-networkd\&.service
have
\fIDefaultDependencies=no\fR, so they are suitable for use in this target, and do not pull in
sysinit\&.target\&.
.PP
You can now switch into this emergency mode by running
\fIsystemctl isolate emergency\-net\&.target\fR
or by passing the option
\fIsystemd\&.unit=emergency\-net\&.target\fR
on the kernel command line\&.
.PP
Other units can have
\fIWantedBy=emergency\-net\&.target\fR
in the
\fI[Install]\fR
section\&. After they are enabled using
\fBsystemctl enable\fR, they will be started before
\fIemergency\-net\&.target\fR
is started\&. It is also possible to add arbitrary units as dependencies of
emergency\&.target
without modifying them by using
\fBsystemctl add\-wants\fR\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemctl\fR(1),
\fBsystemd.unit\fR(5),
\fBsystemd.special\fR(7),
\fBsystemd.directives\fR(7)