]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-install: ignore bogus preload libs
authorDavid Tardon <dtardon@redhat.com>
Thu, 1 Oct 2020 12:08:38 +0000 (14:08 +0200)
committerDaniel Molkentin <daniel@molkentin.de>
Fri, 2 Oct 2020 13:34:40 +0000 (15:34 +0200)
If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd
prints error messages like:

ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.

This causes resolve_deps() to return error, which leads to symlinks
(like usr/bin/awk) not being copied into the initrd.

install/dracut-install.c

index 9fbd72cd6518ba1d5ff7c4d2a4aeb60a5756adaa..ea0668b8642bacb49499e94fcdd1e4efe8919676 100644 (file)
@@ -569,6 +569,9 @@ static int resolve_deps(const char *src)
                 if (strstr(buf, "cannot read header"))
                         break;
 
+                if (strstr(buf, "cannot be preloaded"))
+                        break;
+
                 if (strstr(buf, destrootdir))
                         break;