function FunctionLtspBuildClient {
export INSTALL_ROOT=/opt/ltsp
export ARCH=i386
export NEWROOT=${INSTALL_ROOT}/${ARCH}
# if you get perls error messages about locale missing
export LC_ALL="C"
RELEASE=dapper
# if you have problems downloading files because localhost can't be resolved
for PROXY in $(env|grep "proxy=.*/localhost:"|cut -f1 -d=); do
unset $PROXY
done
if [ ! -f /usr/lib/debootstrap/scripts/${RELEASE} ] ; then
cat <<-EOT >&2
Release /usr/lib/debootstrap/scripts/$RELEASE missing
do something like this:
wget http://archive.ubuntulinux.org/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb
ar xv debootstrap_0.3.3.0ubuntu2_all.deb
tar xvzf data.tar.gz
cp -pi ./usr/lib/debootstrap/scripts/${RELEASE} /usr/lib/debootstrap/scripts/
EOT
exit 1
fi
ltsp-build-client \
--base ${INSTALL_ROOT:-/tmp} \
--dist ${RELEASE} \
--components "main restricted universe multiverse" \
--mirror http://archive.ubuntu.com/ubuntu \
--arch ${ARCH:-i386}
}
# Build ltsp client
FunctionLtspBuildClient
# Now install ssh
chroot ${NEWROOT:-/tmp} /usr/bin/apt-get -y install ssh