Check for both hint files in /var/run (elf and aout) and eventually create

them.

Sysinstall used to check /var/run/ld.so.hints (aout related) and create
hints with the ldconfig command, but the ldconfig command alone will
generate elf hints only. The correct behavior is:

* If /var/run/ld-elf.so.hints does not exist, generate elf hints

* If /var/run/ld.so.hints does not exist, generate aout hints
  (using ldconfig with the -aout option)

This will help ports that check for aout libraries using ldconfig in their
pkg-req scripts.

Approved by:	jkh
MFC after:	1 weeks
This commit is contained in:
Jimmy Olgeni 2001-05-12 19:39:13 +00:00
parent eba4f69287
commit 8a6d4088fa

View file

@ -129,8 +129,10 @@ package_extract(Device *dev, char *name, Boolean depended)
}
/* If necessary, initialize the ldconfig hints */
if (!file_readable("/var/run/ld.so.hints"))
if (!file_readable("/var/run/ld-elf.so.hints"))
vsystem("ldconfig /usr/lib /usr/lib/compat /usr/local/lib /usr/X11R6/lib");
if (!file_readable("/var/run/ld.so.hints"))
vsystem("ldconfig -aout /usr/lib/aout /usr/lib/compat/aout /usr/local/lib/aout /usr/X11R6/lib/aout");
/* Be initially optimistic */
ret = DITEM_SUCCESS;