root=/tmp/$$
dist=squeeze
+srcdir=`dirname $0`
+
# image
[ -e $image ] && echo $image exists && exit 1
dd if=/dev/zero of=$image bs=1M seek=1023 count=1
cleanup() {
umount $root/proc || true
umount $root/sys || true
+ umount $root/dev/pts || true
umount $root
}
trap cleanup INT TERM EXIT
# set up chroot
mount -t proc proc $root/proc
mount -t sysfs sysfs $root/sys
+mount -t devpts devptr $root/dev/pts -o gid=5,mode=620
# set up network
-cp network-from-cmdline $root/etc/init.d/network-from-cmdline
+cp $srcdir/network-from-cmdline $root/etc/init.d/network-from-cmdline
chroot $root update-rc.d network-from-cmdline defaults 20
+# kcon_ helpers
+cp $srcdir/kcon_most.sh $root/root/most.sh
+cp $srcdir/kcon_all.sh $root/root/all.sh
+
# fix up consoles
cat <<EOF >> $root/etc/securetty
chmod 600 $root/root/.ssh/authorized_keys
# packages
-for p in ssh libcrypto++
-do
- chroot $root apt-get -y --force-yes install $p
-done
+chroot $root apt-get -y --force-yes install ssh libcrypto++
exit 0