-#!/bin/sh -e
+#!/bin/bash -e
#
# Copyright © 2008 Andres Salomon <dilinger@queued.net>
#
" \${DN}\\vmlinuz" expand\$ to boot-device
" \${DN}\\initrd.img" expand\$ to ramdisk
then
+dcon-unfreeze
boot
EOF
}
-chroot_internal_mounts()
+start_logging()
{
- root_dir="$1"
- mount -t proc proc ${root_dir}/proc
- mount -t devpts devpts ${root_dir}/dev/pts
- mount -t tmpfs tmpfs ${root_dir}/var/cache/apt/cache
-}
-
-chroot_internal_umounts()
-{
- root_dir="$1"
- umount ${root_dir}/proc
- umount ${root_dir}/dev/pts
- umount ${root_dir}/var/cache/apt/cache
+ logpipe="$1".pipe
+ trap "rm -f $logpipe" 0
+ mknod $logpipe p
+ tee "$1".log <$logpipe &
+ trap "kill $!; rm -f $logpipe" 0
+ exec >$logpipe 2>&1
}