]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Enable userdb tmpfiles dropin on Fedora/CentOS
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 20 Feb 2025 14:08:53 +0000 (15:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 20 Feb 2025 15:57:22 +0000 (16:57 +0100)
It's disabled by default in the Fedora spec, but still available
as an example file. Let's symlink it to the proper name in the images
to enable it again.

mkosi.postinst.chroot

index 310a26fa1414055966945cec916ff09892767b65..693514b3130590d38e28823c07cfd4149e104170 100755 (executable)
@@ -52,6 +52,12 @@ rm -f /etc/default/keyboard
 systemctl mask isc-dhcp-server.service
 systemctl mask mdmonitor.service
 
+# Fedora disables the userdb ssh dropin by default, but helpfully leaves it available in
+# the package so that we can just symlink it to a name that will be picked up by systemd-tmpfiles.
+if [[ -f /usr/lib/tmpfiles.d/20-systemd-userdb.conf.example ]]; then
+    ln --symbolic 20-systemd-userdb.conf.example /usr/lib/tmpfiles.d/20-systemd-userdb.conf
+fi
+
 # This is executed inside the chroot so no need to disable any features as the default features will match
 # the kernel's supported features.
 SYSTEMD_REPART_MKFS_OPTIONS_EXT4="" \