From owner-freebsd-current Sun Sep 22 17: 7: 6 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F48137B401 for ; Sun, 22 Sep 2002 17:07:04 -0700 (PDT) Received: from goliath.cnchost.com (goliath.cnchost.com [207.155.252.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3547C43E4A for ; Sun, 22 Sep 2002 17:07:04 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by goliath.cnchost.com id UAA00098; Sun, 22 Sep 2002 20:07:04 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200209230007.UAA00098@goliath.cnchost.com> To: current@freebsd.org Subject: ldconfig in /etc/rc & /etc/rc.d/ldconfig Date: Sun, 22 Sep 2002 17:07:03 -0700 From: Bakul Shah Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG If the ldconfig_insecure flag is set in /etc/rc.conf, ldconfig doesn't do anything useful at startup time except complain. The following patch should fix it. diff -ur /usr/src/etc/rc ./rc --- /usr/src/etc/rc Tue Sep 17 21:02:01 2002 +++ ./rc Sun Sep 22 16:49:19 2002 @@ -692,9 +692,10 @@ # add your own entries or you may come to grief. # ldconfig="/sbin/ldconfig" +ldc_flags="" case ${ldconfig_insecure} in [Yy][Ee][Ss]) - ldconfig="${ldconfig} -i" + ldc_flags="-i" ;; esac if [ -x /sbin/ldconfig ]; then @@ -705,7 +706,7 @@ fi done echo 'ELF ldconfig path:' ${_LDC} - ${ldconfig} ${_LDC} + ${ldconfig} ${ldc_flags} ${_LDC} # Legacy aout support for i386 only case `sysctl -n hw.machine_arch` in @@ -719,7 +720,7 @@ fi done echo 'a.out ldconfig path:' ${_LDC} - ${ldconfig} -aout ${_LDC} + ${ldconfig} -aout ${ldc_flags} ${_LDC} ;; esac fi diff -ur /usr/src/etc/rc.d/ldconfig ./rc.d/ldconfig --- /usr/src/etc/rc.d/ldconfig Tue Sep 17 21:02:03 2002 +++ ./rc.d/ldconfig Sun Sep 22 16:48:12 2002 @@ -21,7 +21,8 @@ case ${OSTYPE} in FreeBSD) ldconfig=${ldconfig_command} - checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" + ldc_flags="" + checkyesno ldconfig_insecure && ldc_flags="-i" if [ -x "${ldconfig_command}" ]; then _LDC=/usr/lib for i in ${ldconfig_paths}; do @@ -30,7 +31,7 @@ fi done echo 'ELF ldconfig path:' ${_LDC} - ${ldconfig} -elf ${_LDC} + ${ldconfig} -elf ${ldc_flags} ${_LDC} # Legacy aout support for i386 only case `sysctl -n hw.machine_arch` in @@ -44,7 +45,7 @@ fi done echo 'a.out ldconfig path:' ${_LDC} - ${ldconfig} -aout ${_LDC} + ${ldconfig} -aout ${ldc_flags} ${_LDC} ;; esac fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message