[BACK]Return to fix_ldconfig CVS log [TXT][DIR] Up to [local] / openbsd / fill_chroot

Annotation of openbsd/fill_chroot/fix_ldconfig, Revision 1.6

1.1       andrew      1: #!/bin/sh
1.6     ! andrew      2: # $RedRiver: fix_ldconfig,v 1.5 2006/08/13 17:24:38 andrew Exp $
1.1       andrew      3:
1.3       andrew      4: CHROOT=${CHROOT:=/var/www}
1.1       andrew      5:
1.6     ! andrew      6: if [ X"${CHROOT}" == X"" ]; then
1.1       andrew      7:   echo No CHROOT Specified!
                      8:   exit 255
                      9: fi
                     10:
                     11: mkdir -p ${CHROOT}/bin
                     12: mkdir -p ${CHROOT}/var/run
                     13:
1.6     ! andrew     14: for p in /usr/lib /usr/X11R6/lib /usr/local/lib; do
        !            15:        if [ -d ${CHROOT}${p} ]; then
        !            16:                LD_PATH="${LD_PATH} ${p}"
1.5       andrew     17:        fi
                     18: done
                     19:
1.6     ! andrew     20: if [ ! X"${LD_PATH}" == X"" ]; then
        !            21:        cp /sbin/ldconfig ${CHROOT}/bin
        !            22:        echo running: /bin/ldconfig ${LD_PATH}
        !            23:        chroot ${CHROOT} /bin/ldconfig ${LD_PATH}
        !            24:        #chroot ${CHROOT} /bin/ldconfig -r
        !            25:        rm -f ${CHROOT}/bin/ldconfig
        !            26: fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>