summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--strata/foundation/systemd.morph17
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"