Package: qemu Version: 0.9.1-5 Filename: pool/main/q/qemu/qemu_0.9.1-5_i386.deb Found error in /usr/sbin/qemu-make-debian-root: directive 'set -e' found $ grep -A5 -B5 /tmp/ /usr/sbin/qemu-make-debian-root fi cleanup() { echo Cleaning up... >&2 umount -d /tmp/mount.$$ || true rm -f $IMAGE.ext2 $IMAGE } trap cleanup EXIT -- fi mke2fs -q -m1 -F $IMAGE.ext2 # Mount it. mkdir /tmp/mount.$$ mount -o loop $IMAGE.ext2 /tmp/mount.$$ # Do debian install on it. #debootstrap --exclude=syslinux,at,exim,mailx,libstdc++2.10-glibc2.2,mbr,setserial,fdutils,info,ipchains,lilo,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig $DISTRO /tmp/mount.$$ $URL debootstrap --exclude=syslinux,at,exim,mailx,libstdc++2.10-glibc2.2,mbr,setserial,fdutils,info,ipchains,iptables,lilo,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig,wget,telnet,cron,logrotate,exim4,exim4-base,exim4-config,exim4-daemon-light,pciutils,modconf,tasksel $DISTRO /tmp/mount.$$ $URL # Final configuration. cat > /tmp/mount.$$/etc/fstab < /tmp/mount.$$/etc/inittab.new mv /tmp/mount.$$/etc/inittab.new /tmp/mount.$$/etc/inittab # Set hostname to base of image name. basename $IMAGE > /tmp/mount.$$/etc/hostname # Create /etc/shadow chroot /tmp/mount.$$ pwconv # Set root password to "root" sed 's/^root:[^:]*/root:$1$aybpiIGf$cB7iFDNZvViQtQjEZ5HFQ0/' < /tmp/mount.$$/etc/shadow > /tmp/mount.$$/etc/shadow.new mv /tmp/mount.$$/etc/shadow.new /tmp/mount.$$/etc/shadow # Remove packages we don't need chroot /tmp/mount.$$ /usr/bin/dpkg --remove console-common console-tools console-data base-config man-db manpages # Try to remove all libraries: some won't be removable. chroot /tmp/mount.$$ dpkg --remove `chroot /tmp/mount.$$ dpkg --get-selections | sed -n 's/^\(lib[^ \t]*\)[\t ]*install/\1/p'` 2>/dev/null || true # Copy wanted files to /root if asked to if [ $# -gt 0 ]; then cp -a "$@" /tmp/mount.$$/root/ fi umount -d /tmp/mount.$$ # Create file with partition table. uudecode -o- << "EOF" | gunzip > $IMAGE begin 664 partition-table.gz M'XL("*_<##\"`W!A