Created attachment 218813 [details]
Add ldconfig to vmware-guestd REQUIRES: line
Recently at startup of a VM with open-vm-tools-nox11-11.1.5,2 installed I saw the following at bootup:
Oct 16 21:19:19 foobar kernel: Setting hostname: foobar.
Oct 16 21:19:19 foobar kernel: ld-elf.so.1: Shared object "libpcre.so.1" not found, required by "libglib-2.0.so.0"
Oct 16 21:19:19 foobar syslogd: last message repeated 1 times
Oct 16 21:19:19 foobar kernel: /etc/rc: WARNING: failed precmd routine for vmware_guestd
Oct 16 21:19:19 foobar kernel: ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat /usr/
local/lib/compat/pkg /usr/local/lib/dovecot /usr/local/lib/expect5.45.4 /usr/local/lib/gcc10 /usr/local/lib/gcc11 /usr/local/lib/gcc48 /usr/local/lib/gcc7 /usr/
local/lib/gcc8 /usr/local/lib/gcc9 /usr/local/lib/graphviz /usr/local/lib/perl5/5.32/mach/CORE /usr/local/lib/samba4 /usr/local/llvm10/lib /usr/local/llvm80/lib
What happens here is that /usr/local/etc/rc.d/vmware-guestd only has "REQUIRE: FILESYSTEMS" in it, and sometimes it can then be started before /etc/rc.d/ldconfig has run. In that case, /usr/local/lib will not yet have been added to the dynamic linker path, and the above messages will show up.
I propose to add "ldconfig" to the "REQUIRE:" line of the rc.d script template.
A commit references this bug:
Date: Wed Oct 21 18:47:28 UTC 2020
New revision: 552879
Fix an issue where the rc.d script can error out because it was run before ldconfig
Submitted by: dim
Sponsored by: Panzura