From: Stelian Pop Date: Thu, 13 Jan 2005 12:13:46 +0000 (+0000) Subject: Updated buggy example. X-Git-Tag: release_0_4b39~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=35ed8cf887b00613ffa27f7259ef081830f447e2;p=dump.git Updated buggy example. --- diff --git a/CHANGES b/CHANGES index c55d8c8..391d759 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,11 @@ -$Id: CHANGES,v 1.263 2005/01/07 13:30:29 stelian Exp $ +$Id: CHANGES,v 1.264 2005/01/13 12:13:46 stelian Exp $ + +Changes between versions 0.4b38 and 0.4b39 (released ???????????????) +===================================================================== + +1. The newly added dump_on_cd_3 example was buggy, replace it + with an updated version from Andrew Basterfield + . Changes between versions 0.4b37 and 0.4b38 (released January 7, 2005) ===================================================================== diff --git a/examples/dump_on_cd_3/README b/examples/dump_on_cd_3/README index c4da2fc..c632be6 100644 --- a/examples/dump_on_cd_3/README +++ b/examples/dump_on_cd_3/README @@ -4,9 +4,13 @@ dump and acts accordingly. The script commandline takes dump arguments except -f (output file/device), -F (script to run after each volume is finished) and -B (volume size) which are -overridden in the script. +overridden. + +You can use the script to backup to CD with cdrtecord from cdrtools or to +DVD with either cdrtools with DVD support or growisofs from dvd+rw-tools. +You must configure the burning process by adjusting the variables at the top +of the script. Andrew Basterfield bob@cemetery.homeunix.org - diff --git a/examples/dump_on_cd_3/dump_disk b/examples/dump_on_cd_3/dump_disk index b221b7a..3e9200d 100755 --- a/examples/dump_on_cd_3/dump_disk +++ b/examples/dump_on_cd_3/dump_disk @@ -9,19 +9,29 @@ # tsize takes its arguments in Bytes, the shell cannot compute the value # correctly anymore (value too high), so I use bc. -# If you use growisofs which does not have the 10 second delay before burning -# of cdrecord you may want to uncomment SLEEP="10" to ensure there is data -# waiting on the fifo before burning starts - -FIFO="/tmp/dump.$$.fifo" +# Set this to 4300 for DVD and 650 or 700 for CD #DISK_CAPACITY=10 # testing +#DISK_CAPACITY=650 DISK_CAPACITY=4300 + BSIZE="$(echo "$DISK_CAPACITY*1024" | bc -l )" TSIZE="$(echo "$DISK_CAPACITY*1024*1024" | bc -l )" -#RECORD_BIN="dd of=/dev/null bs=1k if=" # testing -#RECORD_BIN="/usr/bin/dvdrecord dev=0,0,0 fs=64M speed=2 -eject -dao -pad -tsize=$TSIZE -data " + +# This is used for testing +#RECORD_BIN="dd of=/dev/null bs=1k if=" + +# This is for writing to CD with cdrtools, this uses track-at-once mode +# in case cdrtools does not support disk-at-once with your burner +#RECORD_BIN="/usr/bin/cdrecord dev=0,0,0 fs=64M speed=2 -eject -tao -pad -tsize=$TSIZE -data " + +# This is for writing to DVD with cdrtools with DVD support, this has to +# use disk-at-once mode. +#RECORD_BIN="/usr/bin/cdrecord dev=0,0,0 fs=64M speed=2 -eject -dao -pad -tsize=$TSIZE -data " + +# This is for writing to DVD with growisofs RECORD_BIN="/usr/bin/growisofs -Z /dev/dvd=" -SLEEP="10" + +FIFO="/tmp/dump.$$.fifo" DUMP="/sbin/dump" cleanup() { @@ -46,7 +56,7 @@ write_output() { echo -n "Is the disk ready? (y/n) " read /dev/null 2>&1 # Kill the background writing process + echo "Waiting for background writing process to complete" + wait % # Wait for the background writing process else - wait % # Or wait for it to complete + kill % >/dev/null 2>&1 # or kill it + exit 1 fi exit 0 else + kill % >/dev/null 2>&1 # Kill the background writing process exit 1 fi fi