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

File: [local] / openbsd / fill_chroot / fix_ldconfig (download)

Revision 1.5, Sun Aug 13 17:24:38 2006 UTC (17 years, 9 months ago) by andrew
Branch: MAIN
Changes since 1.4: +9 -3 lines

don't force the using the X libs if we don't have them

#!/bin/sh
# $RedRiver: fix_ldconfig,v 1.4 2006/06/29 18:44:19 andrew Exp $

CHROOT=${CHROOT:=/var/www}

if [ ${CHROOT}"X" == "X" ]; then
  echo No CHROOT Specified!
  exit 255
fi

mkdir -p ${CHROOT}/bin
mkdir -p ${CHROOT}/var/run

LDPATH=/usr/lib
for d in /usr/X11R6/lib /usr/local/lib; do
	if [ -d $d ]; then
		LDPATH="$LDPATH $d"
	fi
done

cp /sbin/ldconfig ${CHROOT}/bin
chroot ${CHROOT} /bin/ldconfig  ${LDPATH}
rm -f ${CHROOT}/bin/ldconfig