From bd002b6bd879a1d2b4fc21decb92ea98d9e2877c Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 13 Mar 1998 11:12:53 +0000 Subject: [PATCH] Be careful not to spam ld.so.hints in multi-user case. Submitted by: Kazutaka YOKOTA --- release/sysinstall/config.c | 7 +++++-- usr.sbin/sade/config.c | 7 +++++-- usr.sbin/sysinstall/config.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index ca9e68a205cd..3f406abcfc46 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.107 1998/03/09 15:00:43 jkh Exp $ + * $Id: config.c,v 1.108 1998/03/10 17:24:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -510,7 +510,10 @@ configXEnvironment(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; - systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + if (file_readable("/var/run/ld.so.hints")) + systemExecute("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + else + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); config = variable_get(VAR_XF86_CONFIG); if (!config) return DITEM_FAILURE | DITEM_RESTORE; diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index ca9e68a205cd..3f406abcfc46 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.107 1998/03/09 15:00:43 jkh Exp $ + * $Id: config.c,v 1.108 1998/03/10 17:24:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -510,7 +510,10 @@ configXEnvironment(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; - systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + if (file_readable("/var/run/ld.so.hints")) + systemExecute("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + else + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); config = variable_get(VAR_XF86_CONFIG); if (!config) return DITEM_FAILURE | DITEM_RESTORE; diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index ca9e68a205cd..3f406abcfc46 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.107 1998/03/09 15:00:43 jkh Exp $ + * $Id: config.c,v 1.108 1998/03/10 17:24:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -510,7 +510,10 @@ configXEnvironment(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; - systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + if (file_readable("/var/run/ld.so.hints")) + systemExecute("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); + else + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); config = variable_get(VAR_XF86_CONFIG); if (!config) return DITEM_FAILURE | DITEM_RESTORE;