mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
574edc9006
--link-journal={host,guest} fail if the host does not have persistent journalling enabled and /var/log/journal/ does not exist. Even worse, as there is no stdout/err any more, there is no error message to point that out. Introduce two new modes "try-host" and "try-guest" which don't fail in this case, and instead just silently skip the guest journal setup. Change -j to mean "try-guest" instead of "guest", and fix the wrong --help output for it (it said "host" before). Change systemd-nspawn@.service.in to use "try-guest" so that this unit works with both persistent and non-persistent journals on the host without failing. https://bugs.debian.org/770275
22 lines
618 B
SYSTEMD
22 lines
618 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Container %i
|
|
Documentation=man:systemd-nspawn(1)
|
|
|
|
[Service]
|
|
ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/var/lib/container/%i
|
|
KillMode=mixed
|
|
Type=notify
|
|
RestartForceExitStatus=133
|
|
SuccessExitStatus=133
|
|
Delegate=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|