Debian Codegraph @

templates/man8/systemd-soft-reboot.service.8.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:47+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "SYSTEMD-SOFT-REBOOT\\&.SERVICE"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux
28 #, no-wrap
29 msgid "systemd 260.2"
30 msgstr ""
31
32 #. type: TH
33 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
34 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
35 #, no-wrap
36 msgid "systemd-soft-reboot.service"
37 msgstr ""
38
39 #. -----------------------------------------------------------------
40 #. * MAIN CONTENT STARTS HERE *
41 #. -----------------------------------------------------------------
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 msgid "systemd-soft-reboot.service - Userspace reboot operation"
53 msgstr ""
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "SYNOPSIS"
60 msgstr ""
61
62 #. type: Plain text
63 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
64 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
65 msgid "systemd-soft-reboot\\&.service"
66 msgstr ""
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "DESCRIPTION"
73 msgstr ""
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 msgid ""
79 "systemd-soft-reboot\\&.service is a system service that is pulled in by soft-"
80 "reboot\\&.target and is responsible for performing a userspace-only reboot "
81 "operation\\&. When invoked, it will send the B<SIGTERM> signal to any "
82 "processes left running (but does not wait for the processes to exit), and "
83 "follow up with B<SIGKILL>\\&. If the /run/nextroot/ directory exists (which "
84 "may be a regular directory, a directory mount point or a symlink to either) "
85 "then it will switch the file system root to it\\&. It then reexecutes the "
86 "service manager off the (possibly now new) root file system, which will "
87 "enqueue a new boot transaction as in a normal reboot\\&."
88 msgstr ""
89
90 #. type: Plain text
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 msgid ""
94 "Such a userspace-only reboot operation permits updating or resetting the "
95 "entirety of userspace with minimal downtime, as the reboot operation does "
96 "I<not> transition through:"
97 msgstr ""
98
99 #. type: Plain text
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 msgid ""
103 "The second phase of regular shutdown, as implemented by B<systemd-"
104 "shutdown>(8)\\&."
105 msgstr ""
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid ""
111 "The third phase of regular shutdown, i\\&.e\\&. the return to the initrd "
112 "context\\&."
113 msgstr ""
114
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 msgid "The hardware reboot operation\\&."
119 msgstr ""
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid "The firmware initialization\\&."
125 msgstr ""
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 msgid "The boot loader initialization\\&."
131 msgstr ""
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
136 msgid "The kernel initialization\\&."
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid "The initrd initialization\\&."
143 msgstr ""
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid "However, this form of reboot comes with drawbacks as well:"
149 msgstr ""
150
151 #. type: Plain text
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 msgid ""
155 "The OS update remains incomplete, as the kernel is not reset and continues "
156 "running\\&."
157 msgstr ""
158
159 #. type: Plain text
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 msgid ""
163 "Kernel settings (such as /proc/sys/ settings, a\\&.k\\&.a\\&. \"sysctl\", "
164 "or /sys/ settings) are not reset\\&."
165 msgstr ""
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid ""
171 "These limitations may be addressed by various means, which are outside of "
172 "the scope of this documentation, such as kernel live-patching and "
173 "sufficiently comprehensive /etc/sysctl\\&.d/ files\\&."
174 msgstr ""
175
176 #. type: SH
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 #, no-wrap
180 msgid "RESOURCE PASS-THROUGH"
181 msgstr ""
182
183 #. type: Plain text
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 msgid ""
187 "Various runtime OS resources can passed from a system runtime to the next, "
188 "through the userspace reboot operation\\&. Specifically:"
189 msgstr ""
190
191 #. type: Plain text
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 msgid ""
195 "File descriptors placed in the file descriptor store of services that remain "
196 "active until the very end are passed to the next boot, where they are placed "
197 "in the file descriptor store of the same unit\\&. For this to work, units "
198 "must declare I<DefaultDependencies=no> (and avoid a manual "
199 "I<Conflicts=shutdown\\&.target> or similar) to ensure they are not "
200 "terminated as usual during the system shutdown operation\\&. Alternatively, "
201 "use I<FileDescriptorStorePreserve=> to allow the file descriptor store to "
202 "remain pinned even when the unit is down\\&. See B<systemd.service>(5) for "
203 "details about the file descriptor store\\&."
204 msgstr ""
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "Similar to this, file descriptors associated with \\&.socket units remain "
211 "open (and connectible) if the units are not stopped during the "
212 "transition\\&. (Achieved by I<DefaultDependencies=no>\\&.)"
213 msgstr ""
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 msgid ""
219 "The /run/ file system remains mounted and populated and may be used to pass "
220 "state information between such userspace reboot cycles\\&."
221 msgstr ""
222
223 #. type: Plain text
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 msgid ""
227 "Service processes may continue to run over the transition, past soft-reboot "
228 "and into the next session, if they are placed in services that remain active "
229 "until the very end of shutdown (which again is achieved via "
230 "I<DefaultDependencies=no>)\\&. They must also be set up to avoid being "
231 "killed by the aforementioned B<SIGTERM> and B<SIGKILL> via "
232 "I<SurviveFinalKillSignal=yes>, and also be configured to avoid being stopped "
233 "on isolate via I<IgnoreOnIsolate=yes>\\&. They also have to be configured to "
234 "be stopped on normal shutdown, reboot and maintenance mode\\&. Finally, they "
235 "have to be ordered after B<basic\\&.target> to ensure correct ordering on "
236 "boot\\&. Note that in case any new or custom units are used to isolate to, "
237 "or that implement an equivalent shutdown functionality, they will also have "
238 "to be configured manually for correct ordering and conflicting\\&. For "
239 "example:"
240 msgstr ""
241
242 #. type: Plain text
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 #, no-wrap
246 msgid ""
247 "[Unit]\n"
248 "Description=My Surviving Service\n"
249 "SurviveFinalKillSignal=yes\n"
250 "IgnoreOnIsolate=yes\n"
251 "DefaultDependencies=no\n"
252 "After=basic\\&.target\n"
253 "Conflicts=reboot\\&.target kexec\\&.target poweroff\\&.target halt\\&.target rescue\\&.target emergency\\&.target\n"
254 "Before=shutdown\\&.target rescue\\&.target emergency\\&.target\n"
255 msgstr ""
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid ""
262 "[Service]\n"
263 "Type=oneshot\n"
264 "ExecStart=sleep infinity\n"
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "On top of the above, templated units also need a configuration file for "
272 "their slice, as they by default use a slice named after the non-templated "
273 "part of the unit\\&. For example, for a foo@test\\&.service instance, a "
274 "system-foo\\&.slice unit may be added with the following content:"
275 msgstr ""
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 #, no-wrap
281 msgid ""
282 "[Unit]\n"
283 "SurviveFinalKillSignal=yes\n"
284 "IgnoreOnIsolate=yes\n"
285 "DefaultDependencies=no\n"
286 msgstr ""
287
288 #. type: Plain text
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 msgid ""
292 "File system mounts may remain mounted during the transition, and complex "
293 "storage attached, if configured to remain until the very end of the shutdown "
294 "process\\&. (Also achieved via I<DefaultDependencies=no>, and by avoiding "
295 "I<Conflicts=umount\\&.target>)"
296 msgstr ""
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "If the unit publishes a service over D-Bus, the connection needs to be re-"
303 "established after soft-reboot as the D-Bus broker will be stopped and then "
304 "started again\\&. When using the B<sd-bus>(3) library this can be achieved "
305 "by adapting the following example\\&."
306 msgstr ""
307
308 #. type: Plain text
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 #, no-wrap
312 msgid "/* SPDX-License-Identifier: MIT-0 */\n"
313 msgstr ""
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 #, no-wrap
319 msgid ""
320 "/* A D-Bus service that automatically reconnects when the system bus is\n"
321 " * restarted\\&.\n"
322 " *\n"
323 " * Compile with \\*(Aqcc sd_bus_service_reconnect\\&.c $(pkg-config --libs --cflags libsystemd)\\*(Aq\n"
324 " *\n"
325 " * To allow the program to take ownership of the name \\*(Aqorg\\&.freedesktop\\&.ReconnectExample\\*(Aq,\n"
326 " * add the following as /etc/dbus-1/system\\&.d/org\\&.freedesktop\\&.ReconnectExample\\&.conf\n"
327 " * and then reload the broker with \\*(Aqsystemctl reload dbus\\*(Aq:\n"
328 msgstr ""
329
330 #. type: Plain text
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, no-wrap
334 msgid ""
335 "E<lt>?xml version=\"1\\&.0\"?E<gt> E<lt>!--*-nxml-*--E<gt>\n"
336 "E<lt>!DOCTYPE busconfig PUBLIC \"-//freedesktop//DTD D-BUS Bus Configuration 1\\&.0//EN\"\n"
337 " \"http://www\\&.freedesktop\\&.org/standards/dbus/1\\&.0/busconfig\\&.dtd\"E<gt>\n"
338 "E<lt>busconfigE<gt>\n"
339 " E<lt>policy user=\"root\"E<gt>\n"
340 " E<lt>allow own=\"org\\&.freedesktop\\&.ReconnectExample\"/E<gt>\n"
341 " E<lt>allow send_destination=\"org\\&.freedesktop\\&.ReconnectExample\"/E<gt>\n"
342 " E<lt>allow receive_sender=\"org\\&.freedesktop\\&.ReconnectExample\"/E<gt>\n"
343 " E<lt>/policyE<gt>\n"
344 msgstr ""
345
346 #. type: Plain text
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 #, no-wrap
350 msgid ""
351 " E<lt>policy context=\"default\"E<gt>\n"
352 " E<lt>allow send_destination=\"org\\&.freedesktop\\&.ReconnectExample\"/E<gt>\n"
353 " E<lt>allow receive_sender=\"org\\&.freedesktop\\&.ReconnectExample\"/E<gt>\n"
354 " E<lt>/policyE<gt>\n"
355 "E<lt>/busconfigE<gt>\n"
356 msgstr ""
357
358 #. type: Plain text
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid ""
363 " *\n"
364 " * To get the property via busctl:\n"
365 " *\n"
366 " * $ busctl --user get-property org\\&.freedesktop\\&.ReconnectExample \\e\n"
367 " * /org/freedesktop/ReconnectExample \\e\n"
368 " * org\\&.freedesktop\\&.ReconnectExample \\e\n"
369 " * Example\n"
370 " * s \"example\"\n"
371 " */\n"
372 msgstr ""
373
374 #. type: Plain text
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 #, no-wrap
378 msgid ""
379 "#include E<lt>errno\\&.hE<gt>\n"
380 "#include E<lt>stdio\\&.hE<gt>\n"
381 "#include E<lt>stdlib\\&.hE<gt>\n"
382 "#include E<lt>systemd/sd-bus\\&.hE<gt>\n"
383 msgstr ""
384
385 #. type: Plain text
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, no-wrap
389 msgid "#define _cleanup_(f) __attribute__((cleanup(f)))\n"
390 msgstr ""
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 #, no-wrap
396 msgid ""
397 "static int log_error(int r, const char *str) {\n"
398 " fprintf(stderr, \"%s failed: %s\\en\", str, strerror(-r));\n"
399 " return r;\n"
400 "}\n"
401 msgstr ""
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 #, no-wrap
407 msgid ""
408 "typedef struct object {\n"
409 " const char *example;\n"
410 " sd_bus **bus;\n"
411 " sd_event **event;\n"
412 "} object;\n"
413 msgstr ""
414
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid ""
420 "static int property_get(\n"
421 " sd_bus *bus,\n"
422 " const char *path,\n"
423 " const char *interface,\n"
424 " const char *property,\n"
425 " sd_bus_message *reply,\n"
426 " void *userdata,\n"
427 " sd_bus_error *error) {\n"
428 msgstr ""
429
430 #. type: Plain text
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 #, no-wrap
434 msgid " object *o = userdata;\n"
435 msgstr ""
436
437 #. type: Plain text
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid ""
442 " if (strcmp(property, \"Example\") == 0)\n"
443 " return sd_bus_message_append(reply, \"s\", o-E<gt>example);\n"
444 msgstr ""
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 #, no-wrap
450 msgid ""
451 " return sd_bus_error_setf(error,\n"
452 " SD_BUS_ERROR_UNKNOWN_PROPERTY,\n"
453 " \"Unknown property \\*(Aq%s\\*(Aq\",\n"
454 " property);\n"
455 "}\n"
456 msgstr ""
457
458 #. type: Plain text
459 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
460 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
461 #, no-wrap
462 msgid ""
463 "/* https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_add_object\\&.html */\n"
464 "static const sd_bus_vtable vtable[] = {\n"
465 " SD_BUS_VTABLE_START(0),\n"
466 " SD_BUS_PROPERTY(\n"
467 " \"Example\", \"s\",\n"
468 " property_get,\n"
469 " 0,\n"
470 " SD_BUS_VTABLE_PROPERTY_CONST),\n"
471 " SD_BUS_VTABLE_END\n"
472 "};\n"
473 msgstr ""
474
475 #. type: Plain text
476 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
477 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
478 #, no-wrap
479 msgid "static int setup(object *o);\n"
480 msgstr ""
481
482 #. type: Plain text
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 #, no-wrap
486 msgid ""
487 "static int on_disconnect(sd_bus_message *message, void *userdata, sd_bus_error *ret_error) {\n"
488 " int r;\n"
489 msgstr ""
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 #, no-wrap
495 msgid ""
496 " r = setup((object *)userdata);\n"
497 " if (r E<lt> 0) {\n"
498 " object *o = userdata;\n"
499 " r = sd_event_exit(*o-E<gt>event, r);\n"
500 " if (r E<lt> 0)\n"
501 " return log_error(r, \"sd_event_exit()\");\n"
502 " }\n"
503 msgstr ""
504
505 #. type: Plain text
506 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
507 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
508 #, no-wrap
509 msgid ""
510 " return 1;\n"
511 "}\n"
512 msgstr ""
513
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 #, no-wrap
518 msgid ""
519 "/* Ensure the event loop exits with a clear error if acquiring the well-known\n"
520 " * service name fails */\n"
521 "static int request_name_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {\n"
522 " int r;\n"
523 msgstr ""
524
525 #. type: Plain text
526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
528 #, no-wrap
529 msgid ""
530 " if (!sd_bus_message_is_method_error(m, NULL))\n"
531 " return 1;\n"
532 msgstr ""
533
534 #. type: Plain text
535 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
536 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
537 #, no-wrap
538 msgid " const sd_bus_error *error = sd_bus_message_get_error(m);\n"
539 msgstr ""
540
541 #. type: Plain text
542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
544 #, no-wrap
545 msgid ""
546 " if (sd_bus_error_has_names(error, SD_BUS_ERROR_TIMEOUT, SD_BUS_ERROR_NO_REPLY))\n"
547 " return 1; /* The bus is not available, try again later */\n"
548 msgstr ""
549
550 #. type: Plain text
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 #, no-wrap
554 msgid ""
555 " fprintf(stderr, \"Failed to request name: %s\\en\", error-E<gt>message);\n"
556 " object *o = userdata;\n"
557 " r = sd_event_exit(*o-E<gt>event, -sd_bus_error_get_errno(error));\n"
558 " if (r E<lt> 0)\n"
559 " return log_error(r, \"sd_event_exit()\");\n"
560 msgstr ""
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 #, no-wrap
566 msgid ""
567 "static int setup(object *o) {\n"
568 " int r;\n"
569 msgstr ""
570
571 #. type: Plain text
572 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
573 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
574 #, no-wrap
575 msgid ""
576 " /* If we are reconnecting, then the bus object needs to be closed, detached\n"
577 " * from the event loop and recreated\\&.\n"
578 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_detach_event\\&.html\n"
579 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_close_unref\\&.html\n"
580 " */\n"
581 " if (*o-E<gt>bus) {\n"
582 " r = sd_bus_detach_event(*o-E<gt>bus);\n"
583 " if (r E<lt> 0)\n"
584 " return log_error(r, \"sd_bus_detach_event()\");\n"
585 " *o-E<gt>bus = sd_bus_close_unref(*o-E<gt>bus);\n"
586 " }\n"
587 msgstr ""
588
589 #. type: Plain text
590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
592 #, no-wrap
593 msgid ""
594 " /* Set up a new bus object for the system bus, configure it to wait for D-Bus\n"
595 " * to be available instead of failing if it is not, and start it\\&. All the\n"
596 " * following operations are asynchronous and will not block waiting for D-Bus\n"
597 " * to be available\\&.\n"
598 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_new\\&.html\n"
599 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_set_address\\&.html\n"
600 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_set_bus_client\\&.html\n"
601 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_negotiate_creds\\&.html\n"
602 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_set_watch_bind\\&.html\n"
603 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_set_connected_signal\\&.html\n"
604 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_start\\&.html\n"
605 " */\n"
606 " r = sd_bus_new(o-E<gt>bus);\n"
607 " if (r E<lt> 0)\n"
608 " return log_error(r, \"sd_bus_new()\");\n"
609 " r = sd_bus_set_address(*o-E<gt>bus, \"unix:path=/run/dbus/system_bus_socket\");\n"
610 " if (r E<lt> 0)\n"
611 " return log_error(r, \"sd_bus_set_address()\");\n"
612 " r = sd_bus_set_bus_client(*o-E<gt>bus, 1);\n"
613 " if (r E<lt> 0)\n"
614 " return log_error(r, \"sd_bus_set_bus_client()\");\n"
615 " r = sd_bus_negotiate_creds(*o-E<gt>bus, 1, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_EFFECTIVE_CAPS);\n"
616 " if (r E<lt> 0)\n"
617 " return log_error(r, \"sd_bus_negotiate_creds()\");\n"
618 " r = sd_bus_set_watch_bind(*o-E<gt>bus, 1);\n"
619 " if (r E<lt> 0)\n"
620 " return log_error(r, \"sd_bus_set_watch_bind()\");\n"
621 " r = sd_bus_start(*o-E<gt>bus);\n"
622 " if (r E<lt> 0)\n"
623 " return log_error(r, \"sd_bus_start()\");\n"
624 msgstr ""
625
626 #. type: Plain text
627 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
628 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
629 #, no-wrap
630 msgid ""
631 " /* Publish an interface on the bus, specifying our well-known object access\n"
632 " * path and public interface name\\&.\n"
633 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_add_object\\&.html\n"
634 " * https://dbus\\&.freedesktop\\&.org/doc/dbus-tutorial\\&.html\n"
635 " */\n"
636 " r = sd_bus_add_object_vtable(*o-E<gt>bus,\n"
637 " NULL,\n"
638 " \"/org/freedesktop/ReconnectExample\",\n"
639 " \"org\\&.freedesktop\\&.ReconnectExample\",\n"
640 " vtable,\n"
641 " o);\n"
642 " if (r E<lt> 0)\n"
643 " return log_error(r, \"sd_bus_add_object_vtable()\");\n"
644 " /* By default, the service is only assigned an ephemeral name\\&. Also add a\n"
645 " * well-known one, so that clients know whom to call\\&. This needs to be\n"
646 " * asynchronous, as D-Bus might not be yet available\\&. The callback will check\n"
647 " * whether the error is expected or not, in case it fails\\&.\n"
648 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_request_name\\&.html\n"
649 " */\n"
650 " r = sd_bus_request_name_async(*o-E<gt>bus,\n"
651 " NULL,\n"
652 " \"org\\&.freedesktop\\&.ReconnectExample\",\n"
653 " 0,\n"
654 " request_name_callback,\n"
655 " o);\n"
656 " if (r E<lt> 0)\n"
657 " return log_error(r, \"sd_bus_request_name_async()\");\n"
658 " /* When D-Bus is disconnected this callback will be invoked, which will set up\n"
659 " * the connection again\\&. This needs to be asynchronous, as D-Bus might not yet\n"
660 " * be available\\&.\n"
661 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_match_signal_async\\&.html\n"
662 " */\n"
663 " r = sd_bus_match_signal_async(*o-E<gt>bus,\n"
664 " NULL,\n"
665 " \"org\\&.freedesktop\\&.DBus\\&.Local\",\n"
666 " NULL,\n"
667 " \"org\\&.freedesktop\\&.DBus\\&.Local\",\n"
668 " \"Disconnected\",\n"
669 " on_disconnect,\n"
670 " NULL,\n"
671 " o);\n"
672 " if (r E<lt> 0)\n"
673 " return log_error(r, \"sd_bus_match_signal_async()\");\n"
674 " /* Attach the bus object to the event loop so that calls and signals are\n"
675 " * processed\\&.\n"
676 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_attach_event\\&.html\n"
677 " */\n"
678 " r = sd_bus_attach_event(*o-E<gt>bus, *o-E<gt>event, 0);\n"
679 " if (r E<lt> 0)\n"
680 " return log_error(r, \"sd_bus_attach_event()\");\n"
681 msgstr ""
682
683 #. type: Plain text
684 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
685 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
686 #, no-wrap
687 msgid ""
688 " return 0;\n"
689 "}\n"
690 msgstr ""
691
692 #. type: Plain text
693 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
694 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
695 #, no-wrap
696 msgid ""
697 "int main(int argc, char **argv) {\n"
698 " /* The bus should be relinquished before the program terminates\\&. The cleanup\n"
699 " * attribute allows us to do it nicely and cleanly whenever we exit the block\\&.\n"
700 " */\n"
701 " _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;\n"
702 " _cleanup_(sd_event_unrefp) sd_event *event = NULL;\n"
703 " object o = {\n"
704 " \\&.example = \"example\",\n"
705 " \\&.bus = &bus,\n"
706 " \\&.event = &event,\n"
707 " };\n"
708 " int r;\n"
709 msgstr ""
710
711 #. type: Plain text
712 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
713 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
714 #, no-wrap
715 msgid ""
716 " /* Create an event loop data structure, with default parameters\\&.\n"
717 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_event_default\\&.html\n"
718 " */\n"
719 " r = sd_event_default(&event);\n"
720 " if (r E<lt> 0)\n"
721 " return log_error(r, \"sd_event_default()\");\n"
722 msgstr ""
723
724 #. type: Plain text
725 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
726 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
727 #, no-wrap
728 msgid ""
729 " /* By default, the event loop will terminate when all sources have disappeared,\n"
730 " * so we have to keep it \\*(Aqoccupied\\*(Aq\\&. Register signal handling to do so\\&.\n"
731 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_event_add_signal\\&.html\n"
732 " */\n"
733 " r = sd_event_add_signal(event, NULL, SIGINT|SD_EVENT_SIGNAL_PROCMASK, NULL, NULL);\n"
734 " if (r E<lt> 0)\n"
735 " return log_error(r, \"sd_event_add_signal(SIGINT)\");\n"
736 msgstr ""
737
738 #. type: Plain text
739 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
740 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
741 #, no-wrap
742 msgid ""
743 " r = sd_event_add_signal(event, NULL, SIGTERM|SD_EVENT_SIGNAL_PROCMASK, NULL, NULL);\n"
744 " if (r E<lt> 0)\n"
745 " return log_error(r, \"sd_event_add_signal(SIGTERM)\");\n"
746 msgstr ""
747
748 #. type: Plain text
749 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
750 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
751 #, no-wrap
752 msgid ""
753 " r = setup(&o);\n"
754 " if (r E<lt> 0)\n"
755 " return EXIT_FAILURE;\n"
756 msgstr ""
757
758 #. type: Plain text
759 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
760 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
761 #, no-wrap
762 msgid ""
763 " /* Enter the main loop, it will exit only on sigint/sigterm\\&.\n"
764 " * https://www\\&.freedesktop\\&.org/software/systemd/man/sd_event_loop\\&.html\n"
765 " */\n"
766 " r = sd_event_loop(event);\n"
767 " if (r E<lt> 0)\n"
768 " return log_error(r, \"sd_event_loop()\");\n"
769 msgstr ""
770
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 #, no-wrap
775 msgid ""
776 " /* https://www\\&.freedesktop\\&.org/software/systemd/man/sd_bus_release_name\\&.html */\n"
777 " r = sd_bus_release_name(bus, \"org\\&.freedesktop\\&.ReconnectExample\");\n"
778 " if (r E<lt> 0)\n"
779 " return log_error(r, \"sd_bus_release_name()\");\n"
780 msgstr ""
781
782 #. type: Plain text
783 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
784 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
785 msgid ""
786 "Even though passing resources from one soft reboot cycle to the next is "
787 "possible this way, we strongly suggest to use this functionality sparingly "
788 "only, as it creates a more fragile system as resources from different "
789 "versions of the OS and applications might be mixed with unforeseen "
790 "consequences\\&. In particular it is recommended to I<avoid> allowing "
791 "processes to survive the soft reboot operation, as this means code updates "
792 "will necessarily be incomplete, and processes typically pin various other "
793 "resources (such as the file system they are backed by), thus increasing "
794 "memory usage (as two versions of the OS/application/file system might be "
795 "kept in memory)\\&. Leaving processes running during a soft-reboot operation "
796 "requires disconnecting the service comprehensively from the rest of the OS, "
797 "i\\&.e\\&. minimizing IPC and reducing sharing of resources with the rest of "
798 "the OS\\&. A possible mechanism to achieve this is the concept of "
799 "\\m[blue]B<Portable Services>\\m[]\\&\\s-2\\u[1]\\d\\s+2, but make sure no "
800 "resource from the host\\*(Aqs OS filesystems is pinned via I<BindPaths=> or "
801 "similar unit settings, otherwise the old, originating filesystem will remain "
802 "mounted as long as the unit is running\\&."
803 msgstr ""
804
805 #. type: SH
806 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
807 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
808 #, no-wrap
809 msgid "NOTES"
810 msgstr ""
811
812 #. type: Plain text
813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
815 msgid ""
816 "Note that because B<systemd-shutdown>(8) is not executed, the executables "
817 "in /usr/lib/systemd/system-shutdown/ are not executed either\\&."
818 msgstr ""
819
820 #. type: Plain text
821 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
822 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
823 msgid ""
824 "Note that systemd-soft-reboot\\&.service (and related units) should never be "
825 "executed directly\\&. Instead, trigger system shutdown with a command such "
826 "as B<systemctl soft-reboot>\\&."
827 msgstr ""
828
829 #. type: Plain text
830 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
831 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
832 msgid ""
833 "Note that if a new root file system has been set up on \"/run/nextroot/\", a "
834 "B<soft-reboot> will be performed when the B<reboot> command is invoked\\&."
835 msgstr ""
836
837 #. type: SH
838 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
839 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
840 #, no-wrap
841 msgid "SEE ALSO"
842 msgstr ""
843
844 #. type: Plain text
845 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
846 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
847 msgid ""
848 "B<systemd>(1), B<systemctl>(1), B<systemd.special>(7), B<systemd-"
849 "poweroff.service>(8), B<systemd-suspend.service>(8), B<bootup>(7)"
850 msgstr ""
851
852 #. type: IP
853 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
854 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
855 #, no-wrap
856 msgid " 1."
857 msgstr ""
858
859 #. type: Plain text
860 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
861 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
862 msgid "Portable Services"
863 msgstr ""
864
865 #. type: Plain text
866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
868 msgid "\\%https://systemd.io/PORTABLE_SERVICES"
869 msgstr ""
870
871 #. type: TH
872 #: debian-trixie opensuse-leap-16-1
873 #, no-wrap
874 msgid "systemd 257.13"
875 msgstr ""
876
877 #. type: TH
878 #: debian-unstable
879 #, no-wrap
880 msgid "systemd 261~rc3"
881 msgstr ""
882
883 #. type: TH
884 #: fedora-44
885 #, no-wrap
886 msgid "systemd 259.5"
887 msgstr ""
888
889 #. type: TH
890 #: fedora-rawhide
891 #, no-wrap
892 msgid "systemd 261~rc2"
893 msgstr ""
894
895 #. type: TH
896 #: mageia-cauldron
897 #, no-wrap
898 msgid "systemd 258.7"
899 msgstr ""
900
901 #. type: TH
902 #: opensuse-tumbleweed
903 #, no-wrap
904 msgid "systemd 260.1"
905 msgstr ""