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

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

Revision 1.13, Wed Sep 17 20:08:17 2008 UTC (15 years, 8 months ago) by andrew
Branch: MAIN
Changes since 1.12: +5 -5 lines

Note where we are installing stuff, just for fun

#!/bin/sh
# $RedRiver: fill_chroot,v 1.12 2008/09/16 22:38:35 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 Making devices
cd ${CHROOT}/dev
/dev/MAKEDEV std
cd ${OLDPWD}

echo Installing perl into ${CHROOT}
perl_to_chroot

if [ -e /usr/local/sbin/femail ]; then 
	echo Installing femail into ${CHROOT}
	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 into ${CHROOT}
	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 into ${CHROOT}
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