tazlito rev 115

Add command emu-iso to emulate ISO image
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 17 18:35:34 2010 +0100 (2010-01-17)
parents 5ce7a77c10fd
children aab790984c6d
files tazlito tazlito.conf
line diff
     1.1 --- a/tazlito	Sun Nov 08 01:02:54 2009 +0100
     1.2 +++ b/tazlito	Sun Jan 17 18:35:34 2010 +0100
     1.3 @@ -7,7 +7,7 @@
     1.4  # and/or a new ISO. Most commands must be run by root, except the stats
     1.5  # and the configuration file manipulation.
     1.6  #
     1.7 -# (C) 2007-2009 SliTaz - GNU General Public License.
     1.8 +# (C) 2007-2010 SliTaz - GNU General Public License.
     1.9  #
    1.10  # Authors : Christophe Lincoln <pankso@slitaz.org>
    1.11  #           Pascal Bellard <pascal.bellard@slitaz.org>
    1.12 @@ -1598,15 +1598,31 @@
    1.13  		create_iso $ISO $TMP_DIR/iso
    1.14  		rm -rf $TMP_DIR
    1.15  		;;
    1.16 +	
    1.17 +	emu-iso)
    1.18 +		# Emulate an ISO image with Qemu.
    1.19 +		if [ -n "$2" ] ; then
    1.20 +			iso=$2
    1.21 +		else
    1.22 +			iso=$DISTRO/$ISO_NAME.iso
    1.23 +		fi
    1.24 +		if [ ! -f "$iso" ]; then
    1.25 +			echo -e "\nUnable to find ISO : $iso\n"
    1.26 +			exit 0
    1.27 +		fi
    1.28 +		if [ ! -x "/usr/bin/qemu" ]; then
    1.29 +			echo -e "\nUnable to find Qemu binary. Please install: qemu\n"
    1.30 +			exit 0
    1.31 +		fi
    1.32 +		echo -e "\nStarting Qemu emulator:\n"
    1.33 +		echo -e "qemu $QEMU_OPTS $iso\n"
    1.34 +		qemu $QEMU_OPTS $iso ;;
    1.35  
    1.36  	usage|*)
    1.37  		# Clear and print usage also for all unknown commands.
    1.38  		#
    1.39  		clear
    1.40 -		usage
    1.41 -		;;
    1.42 -
    1.43 +		usage ;;
    1.44  esac
    1.45  
    1.46  exit 0
    1.47 -
     2.1 --- a/tazlito.conf	Sun Nov 08 01:02:54 2009 +0100
     2.2 +++ b/tazlito.conf	Sun Jan 17 18:35:34 2010 +0100
     2.3 @@ -22,3 +22,6 @@
     2.4  # Path to the directory containing additional files
     2.5  # to copy into the rootfs and rootcd of the LiveCD.
     2.6  ADDFILES="$DISTRO/addfiles"
     2.7 +
     2.8 +# Qemu emulator options for command: emu-iso
     2.9 +QEMU_OPTS="-m 256"