=================================================================== RCS file: /cvs/openbsd/fill_chroot/fix_ldconfig,v retrieving revision 1.1 retrieving revision 1.7 diff -u -r1.1 -r1.7 --- openbsd/fill_chroot/fix_ldconfig 2005/12/21 18:04:06 1.1 +++ openbsd/fill_chroot/fix_ldconfig 2008/09/16 23:14:28 1.7 @@ -1,9 +1,7 @@ #!/bin/sh -# $RedRiver$ +# $RedRiver: fix_ldconfig,v 1.6 2006/10/19 16:24:00 andrew Exp $ -CHROOT=${CHROOT:=/home/andrew/www} - -if [ ${CHROOT}"X" == "X" ]; then +if [ X"${CHROOT}" == X"" ]; then echo No CHROOT Specified! exit 255 fi @@ -11,7 +9,16 @@ mkdir -p ${CHROOT}/bin mkdir -p ${CHROOT}/var/run -cp /sbin/ldconfig ${CHROOT}/bin -chroot ${CHROOT} /bin/ldconfig /usr/local/lib -rm -f ${CHROOT}/bin/ldconfig +for p in /usr/lib /usr/X11R6/lib /usr/local/lib; do + if [ -d ${CHROOT}${p} ]; then + LD_PATH="${LD_PATH} ${p}" + fi +done +if [ ! X"${LD_PATH}" == X"" ]; then + cp /sbin/ldconfig ${CHROOT}/bin + echo running: /bin/ldconfig ${LD_PATH} + chroot ${CHROOT} /bin/ldconfig ${LD_PATH} + #chroot ${CHROOT} /bin/ldconfig -r + rm -f ${CHROOT}/bin/ldconfig +fi