This change makes sure that ldconfig.service is not included in the
target rootfs that the test case is booting into.
# Create what will eventually be our root filesystem onto an overlay
"$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-m "test-root systemd" \
- -I "ldconfig" \
-i ./test-init.sh /sbin/test-init \
-i ./fstab /etc/fstab \
-i "${PKGLIBDIR}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
# softlink mtab
ln -fs /proc/self/mounts "$initdir"/etc/mtab
+ # Do not need ldconfig.service in our rootfs
+ rm -rf "$initdir"/usr/lib/systemd/system/sysinit.target.wants/ldconfig.service
+
# install any Execs from the service files
grep -Eho '^Exec[^ ]*=[^ ]+' "$initdir"{,/usr}/lib/systemd/system/*.service \
| while read -r i || [ -n "$i" ]; do