-$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
+ <bob@cemetery.homeunix.org>.
Changes between versions 0.4b37 and 0.4b38 (released January 7, 2005)
=====================================================================
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
-
# 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() {
echo -n "Is the disk ready? (y/n) "
read </dev/tty ANSWER
if [ "$ANSWER" == "y" ] ; then
- ([ -n "$SLEEP" ] && sleep $SLEEP; ${RECORD_BIN}${1}) &
+ (${RECORD_BIN}${1}) &
return 0
elif [ "$ANSWER" == "n" ] ; then
EXIT=""
trap cleanup EXIT
if write_output "$FIFO" "0"; then
if $DUMP "$@" -F "$0" -f "$FIFO" -B$BSIZE; then
- kill % >/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