From d4d4587a43ab0106e3c34dfbb9d01c36d269e1c3 Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Thu, 23 Apr 2015 17:04:01 +0000 Subject: Configure systemd to support user instances This involves: * Adding XDG_RUNTIME_DIR to systemd's environment variables. * Replacing the systemd pam config with one that works. * A workaround to user@.service being shut down prematurely. * Fixing a systemd unit using 'kill' from a path that doesn't necessarily exist. Change-Id: Iacad155da9752313a2e4bbaae34a3e593d6ecc1b --- strata/foundation/systemd.morph | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph index c53cef39..369aa276 100644 --- a/strata/foundation/systemd.morph +++ b/strata/foundation/systemd.morph @@ -1,6 +1,22 @@ name: systemd kind: chunk build-system: autotools +pre-configure-commands: +# systemd prematurely kills the user session +- | + cat >> units/user@.service.m4.in < "src/login/systemd-user" <<"EOF" + account include system-account + session include system-session + session optional pam_systemd.so + EOF +# it becomes /usr/bin/kill, which may not exist +- sed -i 's:@KILL@:/bin/kill:' units/user/systemd-exit.service.in configure-commands: - sh autogen.sh - | @@ -27,3 +43,4 @@ post-install-commands: [Network] DHCP=yes EOF +- sed -i 's:#DefaultEnvironment=:DefaultEnvironment="XDG_RUNTIME_DIR=/tmp":' "$DESTDIR/etc/systemd/system.conf" -- cgit v1.2.1