=================================================================== RCS file: /cvs/openbsd/fill_chroot/fix_ldconfig,v retrieving revision 1.8 retrieving revision 1.11 diff -u -r1.8 -r1.11 --- openbsd/fill_chroot/fix_ldconfig 2008/09/16 23:44:51 1.8 +++ openbsd/fill_chroot/fix_ldconfig 2019/11/04 01:13:18 1.11 @@ -1,5 +1,5 @@ #!/bin/sh -# $RedRiver: fix_ldconfig,v 1.7 2008/09/16 22:14:28 andrew Exp $ +# $AFresh1: fix_ldconfig,v 1.10 2011/08/09 00:13:54 andrew Exp $ if [ X"${CHROOT}" == X"" ]; then echo No CHROOT Specified! @@ -8,7 +8,7 @@ mkdir -p ${CHROOT}/var/run -for p in /usr/lib /usr/X11R6/lib /usr/local/lib; do +for p in `ldconfig -r | awk '/search directories:/ { gsub(":", " ", $3); print $3 }'` ; do if [ -d ${CHROOT}${p} ]; then LD_PATH="${LD_PATH} ${p}" fi @@ -17,7 +17,7 @@ if [ ! X"${LD_PATH}" == X"" ]; then cp /sbin/ldconfig ${CHROOT} echo running: ldconfig ${LD_PATH} - chroot ${CHROOT} ldconfig ${LD_PATH} + chroot ${CHROOT} ./ldconfig ${LD_PATH} #chroot ${CHROOT} ldconfig -r rm -f ${CHROOT}/ldconfig fi