build-rootfs: Avoid spurious boot errors

The *ldconfig.service* fails because `/etc` is not writable and thus
`/etc/ld.so.cache` cannot be generated.

The files specified in the `provision.d` *tmpfiles.d(5)* configuration
are unnecessary, and many of them cannot be created at runtime because
the root filesystem is immutable.
gentoo
Dustin 2023-02-13 21:23:18 -06:00
parent fef78afa31
commit f32c6d37a4
1 changed files with 3 additions and 0 deletions

View File

@ -65,7 +65,10 @@ if [ -f /mnt/gentoo/etc/udev/hwdb.bin ]; then
mv /mnt/gentoo/etc/udev/hwdb.bin /mnt/gentoo/usr/lib/udev/
fi
rm -f /mnt/gentoo/lib/tmpfiles.d/provision.conf
systemctl preset-all --root=/mnt/gentoo
rm -f /mnt/gentoo/lib/systemd/system/sysinit.target.wants/ldconfig.service
systemd-sysusers --root=/mnt/gentoo
if grep -q '^root:.*/bin/bash$' /mnt/gentoo/etc/passwd; then