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

Annotation of openbsd/fill_chroot/fix_ldconfig, Revision 1.10

1.1       andrew      1: #!/bin/sh
1.10    ! andrew      2: # $AFresh1: fix_ldconfig,v 1.8 2008/09/16 22:44:51 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}/var/run
                     10:
1.9       andrew     11: for p in `ldconfig -r | awk '/search directories:/ { gsub(":", " ", $3); print $3 }'` ; do
1.6       andrew     12:        if [ -d ${CHROOT}${p} ]; then
                     13:                LD_PATH="${LD_PATH} ${p}"
1.5       andrew     14:        fi
                     15: done
                     16:
1.6       andrew     17: if [ ! X"${LD_PATH}" == X"" ]; then
1.8       andrew     18:        cp /sbin/ldconfig ${CHROOT}
                     19:        echo running: ldconfig ${LD_PATH}
                     20:        chroot ${CHROOT} ldconfig ${LD_PATH}
                     21:        #chroot ${CHROOT} ldconfig -r
                     22:        rm -f ${CHROOT}/ldconfig
1.6       andrew     23: fi

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