From 8a6d4088faeb69de446624801758b40fff2057ff Mon Sep 17 00:00:00 2001 From: Jimmy Olgeni Date: Sat, 12 May 2001 19:39:13 +0000 Subject: [PATCH] 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 --- usr.sbin/sysinstall/package.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c index eb468aaba25..577421fc567 100644 --- a/usr.sbin/sysinstall/package.c +++ b/usr.sbin/sysinstall/package.c @@ -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;