From: Daan De Meyer Date: Wed, 9 Apr 2025 13:27:51 +0000 (+0200) Subject: mkosi: Rely on tmpfiles to put nsswitch.conf in place X-Git-Tag: v258-rc1~847^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b1c66f72c25741a05b4418dd2400f2c52bead89;p=thirdparty%2Fsystemd.git mkosi: Rely on tmpfiles to put nsswitch.conf in place Let's rely on tmpfiles to put our nsswitch.conf in place instead of doing it in the post-install script. This moves us one step closer to being able to build the mkosi image without having the source tree available when NO_BUILD is used. --- diff --git a/mkosi/mkosi.postinst.chroot b/mkosi/mkosi.postinst.chroot index 3a021bffd9c..1d4c5f4451f 100755 --- a/mkosi/mkosi.postinst.chroot +++ b/mkosi/mkosi.postinst.chroot @@ -34,8 +34,9 @@ done # systemd-journald. rm -rf "$BUILDROOT/var/log/journal" +# Make sure our own nsswitch.conf from the repository is used instead of the distribution's by deleting the +# distribution's and relying on tmpfiles to put ours in place during boot. rm -f /etc/nsswitch.conf -cp "$SRCDIR/factory/etc/nsswitch.conf" /etc/nsswitch.conf # Remove to make TEST-73-LOCALE pass on Ubuntu. rm -f /etc/default/keyboard