#!/bin/sh # $RedRiver: fill_chroot,v 1.10 2008/09/16 22:13:21 andrew Exp $ CHROOT=${CHROOT:=/home/andrew/www} export CHROOT _find="-name '*.so.*' -o -name '*.so' -o ( -name perl -a -type f )" install -d -m 1750 -o www -g bin ${CHROOT}/tmp for d in ${CHROOT}/{bin,sbin,usr,var,dev}/ \ ${CHROOT}/var/run/ \ ${CHROOT}/usr/{lib,bin,sbin,libexec,local}/ \ ${CHROOT}/usr/local/{lib,bin,sbin,share}/\ ; do install -d -m 0555 -o root -g wheel $d done echo Installing ld.so echo pax -r -w -L -p e /usr/libexec/ld.so ${CHROOT} pax -r -w -L -p e /usr/libexec/ld.so ${CHROOT} echo Making devices cd ${CHROOT}/dev /dev/MAKEDEV std cd ${OLDPWD} echo Installing perl perl_to_chroot if [ -e /usr/local/sbin/femail ]; then echo Installing femail echo pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT} pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT} else echo femail not installed! Please install it and link it to echo " ${CHROOT}/usr/sbin/sendmail" fi if [ -e ${CHROOT}/usr/local/sbin/femail ]; then echo Installing sendmail symlink to femail cd ${CHROOT}/usr/sbin/ ln -sf ../local/sbin/femail sendmail cd ${OLDPWD} fi if [ -e /usr/local/bin/aspell ]; then echo Installing aspell for d in \ /usr/local/bin/aspell \ /usr/local/lib/aspell \ /usr/local/share/aspell \ ; do echo pax -r -w -L -p e $d ${CHROOT} pax -r -w -L -p e $d ${CHROOT} done _find="${_find} -o ( -name aspell -a -type f )" fi echo Installing dependencies for d in `find ${CHROOT}/usr ${_find} | \ xargs find_depends | \ sort -u `; do echo pax -r -w -L -p e $d ${CHROOT} pax -r -w -L -p e $d ${CHROOT} done echo Fixing ldconfig \(/var/run/ld.so.hints\) fix_ldconfig