From 574edc90066c3faeadcf4666928ed9b0ac409c75 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 20 Nov 2014 14:30:52 +0100 Subject: nspawn: Add try-{host,guest} journal link modes --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 --- units/systemd-nspawn@.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'units') diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in index dec2ce7df7..e3eaa53239 100644 --- a/units/systemd-nspawn@.service.in +++ b/units/systemd-nspawn@.service.in @@ -10,7 +10,7 @@ Description=Container %i Documentation=man:systemd-nspawn(1) [Service] -ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i +ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/var/lib/container/%i KillMode=mixed Type=notify RestartForceExitStatus=133 -- cgit v1.2.3-54-g00ecf