# HG changeset patch # User Christophe Lincoln # Date 1263749734 -3600 # Node ID 19b765eb141853dec3f503cd03630a9063097bf7 # Parent 5ce7a77c10fd1d35e2834386f0a23f3f731fbb1e Add command emu-iso to emulate ISO image diff -r 5ce7a77c10fd -r 19b765eb1418 tazlito --- a/tazlito Sun Nov 08 01:02:54 2009 +0100 +++ b/tazlito Sun Jan 17 18:35:34 2010 +0100 @@ -7,7 +7,7 @@ # and/or a new ISO. Most commands must be run by root, except the stats # and the configuration file manipulation. # -# (C) 2007-2009 SliTaz - GNU General Public License. +# (C) 2007-2010 SliTaz - GNU General Public License. # # Authors : Christophe Lincoln # Pascal Bellard @@ -1598,15 +1598,31 @@ create_iso $ISO $TMP_DIR/iso rm -rf $TMP_DIR ;; + + emu-iso) + # Emulate an ISO image with Qemu. + if [ -n "$2" ] ; then + iso=$2 + else + iso=$DISTRO/$ISO_NAME.iso + fi + if [ ! -f "$iso" ]; then + echo -e "\nUnable to find ISO : $iso\n" + exit 0 + fi + if [ ! -x "/usr/bin/qemu" ]; then + echo -e "\nUnable to find Qemu binary. Please install: qemu\n" + exit 0 + fi + echo -e "\nStarting Qemu emulator:\n" + echo -e "qemu $QEMU_OPTS $iso\n" + qemu $QEMU_OPTS $iso ;; usage|*) # Clear and print usage also for all unknown commands. # clear - usage - ;; - + usage ;; esac exit 0 - diff -r 5ce7a77c10fd -r 19b765eb1418 tazlito.conf --- a/tazlito.conf Sun Nov 08 01:02:54 2009 +0100 +++ b/tazlito.conf Sun Jan 17 18:35:34 2010 +0100 @@ -22,3 +22,6 @@ # Path to the directory containing additional files # to copy into the rootfs and rootcd of the LiveCD. ADDFILES="$DISTRO/addfiles" + +# Qemu emulator options for command: emu-iso +QEMU_OPTS="-m 256"