Thanks!
----- Original Message -----
From: Carl Lowenstein <[EMAIL PROTECTED]>
Date: Tuesday, August 30, 2005 12:07 pm
Subject: Re: CD Tests in Fedora Install
> Just for the sake of completeness, since it isn't very big, here is
> the real thing:
>
> [EMAIL PROTECTED] bin]$ cat isocmp
> #!/bin/sh
> # -rwxrwxr-x 1 cdl cdl 747 Jul 22 21:42 /home/cdl/src/burncd/isocmp
> # isocmp
> # compare image on burned {cd,dvd} with its source file
> # size=$(isosize -d 2048 $2)
> # don't use isosize, in case the image is not really iso9660
>
> case $# in
> 2) ;;
> *) echo "usage: $0 /dev/cdrom /source/file.iso"; exit 2;;
> esac
>
> # a few sanity tests
> if test ! -r $1
> then echo "can't read $1"; exit 2
> fi
> if test ! -r $2
> then echo "can't read $2"; exit 2
> fi
> if test ! -f $2
> then echo "$2 is not a file"; exit 2
> fi
>
> # compute size of file in 2kB blocks
> size=$( dc -e "$(ls -l $2 | gawk '{print $5}') 2048/p")
>
> # do the real work here, compare device file and source file byte
> by byte
> dd if=$1 bs=2k count=$size 2>/dev/null | cmp -s $2 -
>
> # report result
> case $? in
> 0) echo "good"; exit 0;;
> *) echo "bad"; exit 1;;
> esac
> [EMAIL PROTECTED] bin]$
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list