]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(FULL-SYSTEMD): remove ldconfig.service from the target rootfs
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 26 Apr 2024 13:36:45 +0000 (09:36 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Fri, 26 Apr 2024 16:50:00 +0000 (12:50 -0400)
This change makes sure that ldconfig.service is not included in the
target rootfs that the test case is booting into.

test/TEST-04-FULL-SYSTEMD/test.sh

index 3508eef2733a9e3ff59e870a58f3f609b668c4c0..5ec589db0dbd8a2d44b4c961b240585bd1b47e87 100755 (executable)
@@ -53,7 +53,6 @@ test_setup() {
     # 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" \
@@ -79,6 +78,9 @@ test_setup() {
     # 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