diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2015-04-23 17:04:01 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2015-04-27 12:35:07 +0000 |
commit | d4d4587a43ab0106e3c34dfbb9d01c36d269e1c3 (patch) | |
tree | 5473680af8a6eca45b4637273210c31655b1d71d | |
parent | fda3df9834dfc55796085cb174b8c70de4e4dbb2 (diff) | |
download | definitions-d4d4587a43ab0106e3c34dfbb9d01c36d269e1c3.tar.gz |
Configure systemd to support user instancesbaserock/jonathanmaw/pam-systemd
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
-rw-r--r-- | strata/foundation/systemd.morph | 17 |
1 files changed, 17 insertions, 0 deletions
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 <<EOF + KillSignal=SIGCONT + ExecStop=/bin/kill -TERM \$MAINPID + EOF +# overwrite systemd's pam config with one that works +- | + cat > "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" |