summaryrefslogtreecommitdiff
path: root/strata/foundation/systemd.morph
diff options
context:
space:
mode:
Diffstat (limited to 'strata/foundation/systemd.morph')
-rw-r--r--strata/foundation/systemd.morph31
1 files changed, 31 insertions, 0 deletions
diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph
new file mode 100644
index 00000000..d0f962a8
--- /dev/null
+++ b/strata/foundation/systemd.morph
@@ -0,0 +1,31 @@
+name: systemd
+kind: chunk
+build-system: autotools
+configure-commands:
+- ./autogen.sh
+- ./configure --prefix="$PREFIX" --sysconfdir=/etc --localstatedir=/var
+ --disable-manpages
+ --disable-tests
+ --libexecdir="$PREFIX/libexec"
+ --enable-split-usr
+post-install-commands:
+- mkdir -p "$DESTDIR"/sbin
+- ln -s "$PREFIX"/lib/systemd/systemd "$DESTDIR"/sbin/init
+- for f in telinit runlevel shutdown poweroff reboot halt; do ln -s "$PREFIX"/bin/systemctl
+ "$DESTDIR/sbin/$f"; done
+- touch "$DESTDIR/etc/machine-id"
+- |
+ cat > "$DESTDIR/etc/systemd/network/10-dhcp.network" << "EOF"
+ [Match]
+ Name=e*
+
+ [Network]
+ DHCP=yes
+ EOF
+# Use the pam config systemd provides
+- cp -a "$DESTDIR/$PREFIX"/share/factory/etc/pam.d/* "$DESTDIR/etc/pam.d"
+
+# Add pam_deny.so to the default systemd-auth pam.d config file. Without
+# it, if shadow is configured to use PAM, it would be possible to login
+# to a system with the wrong password.
+- echo 'auth requisite pam_deny.so' >> "$DESTDIR"/etc/pam.d/system-auth