Annotation of openbsd/fill_chroot/fix_ldconfig, Revision 1.7
1.1 andrew 1: #!/bin/sh
1.7 ! andrew 2: # $RedRiver: fix_ldconfig,v 1.6 2006/10/19 16:24:00 andrew Exp $
1.1 andrew 3:
1.6 andrew 4: if [ X"${CHROOT}" == X"" ]; then
1.1 andrew 5: echo No CHROOT Specified!
6: exit 255
7: fi
8:
9: mkdir -p ${CHROOT}/bin
10: mkdir -p ${CHROOT}/var/run
11:
1.6 andrew 12: for p in /usr/lib /usr/X11R6/lib /usr/local/lib; do
13: if [ -d ${CHROOT}${p} ]; then
14: LD_PATH="${LD_PATH} ${p}"
1.5 andrew 15: fi
16: done
17:
1.6 andrew 18: if [ ! X"${LD_PATH}" == X"" ]; then
19: cp /sbin/ldconfig ${CHROOT}/bin
20: echo running: /bin/ldconfig ${LD_PATH}
21: chroot ${CHROOT} /bin/ldconfig ${LD_PATH}
22: #chroot ${CHROOT} /bin/ldconfig -r
23: rm -f ${CHROOT}/bin/ldconfig
24: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>